mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
support for \land and \vee, cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2292 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b28c9e2f93
commit
96a1cc78b2
@ -1,3 +1,7 @@
|
||||
2001-07-20 André Pönitz <poenitz@htwm.de>
|
||||
|
||||
* math_macrotable.C: support for \land and \vee
|
||||
|
||||
2001-07-16 André Pönitz <poenitz@htwm.de>
|
||||
|
||||
* math_grid.[Ch] -> math_gridinset.[Ch]
|
||||
|
@ -64,10 +64,8 @@ InsetFormula::InsetFormula(MathInsetTypes t)
|
||||
|
||||
|
||||
InsetFormula::InsetFormula(string const & s)
|
||||
: InsetFormulaBase(0)
|
||||
: InsetFormulaBase(mathed_parse(s))
|
||||
{
|
||||
istringstream is(s.c_str());
|
||||
par(mathed_parse(is));
|
||||
Metrics();
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,18 @@ void MathMacroTable::builtinMacros()
|
||||
insertTemplate(t);
|
||||
}
|
||||
|
||||
{
|
||||
MathMacroTemplate * t = new MathMacroTemplate("land", 0);
|
||||
t->push_back(LM_wedge, LM_TC_SYMB);
|
||||
insertTemplate(t);
|
||||
}
|
||||
|
||||
{
|
||||
MathMacroTemplate * t = new MathMacroTemplate("lor", 0);
|
||||
t->push_back(LM_vee, LM_TC_SYMB);
|
||||
insertTemplate(t);
|
||||
}
|
||||
|
||||
{
|
||||
MathMacroTemplate * t = new MathMacroTemplate("to", 0);
|
||||
t->push_back(LM_rightarrow, LM_TC_SYMB);
|
||||
@ -130,6 +142,7 @@ void MathMacroTable::builtinMacros()
|
||||
t->push_back(LM_bot, LM_TC_BOP);
|
||||
insertTemplate(t);
|
||||
}
|
||||
|
||||
/*
|
||||
{
|
||||
MathMacroTemplate & m = createTemplate("lint", 4);
|
||||
|
@ -8,12 +8,12 @@
|
||||
|
||||
|
||||
MathMacroTemplate::MathMacroTemplate() :
|
||||
MathInset(1, "undefined", LM_OT_MACRO), numargs_(0), users_()
|
||||
MathInset(1, "undefined", LM_OT_MACRO), numargs_(0)
|
||||
{}
|
||||
|
||||
|
||||
MathMacroTemplate::MathMacroTemplate(string const & nm, int numargs) :
|
||||
MathInset(1, nm, LM_OT_MACRO), numargs_(numargs), users_()
|
||||
MathInset(1, nm, LM_OT_MACRO), numargs_(numargs)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
#ifndef MATH_MACROTEMPLATE_H
|
||||
#define MATH_MACROTEMPLATE_H
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "math_inset.h"
|
||||
|
||||
#ifdef __GNUG__
|
||||
@ -38,13 +36,8 @@ public:
|
||||
private:
|
||||
///
|
||||
int numargs_;
|
||||
///
|
||||
std::set<MathMacro *> users_;
|
||||
|
||||
/// unimplemented
|
||||
void operator=(MathMacroTemplate const &);
|
||||
/// unimplemented
|
||||
//MathMacroTemplate(MathMacroTemplate const &);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -819,6 +819,12 @@ void mathed_parse(MathArray & array, unsigned flags)
|
||||
|
||||
}
|
||||
|
||||
MathInset * mathed_parse(string const & str)
|
||||
{
|
||||
istringstream is(str.c_str());
|
||||
return mathed_parse(is);
|
||||
}
|
||||
|
||||
|
||||
MathInset * mathed_parse(istream & is)
|
||||
{
|
||||
|
@ -117,6 +117,7 @@ latexkeys const * in_word_set(string const & str);
|
||||
latexkeys const * lm_get_key_by_id(unsigned int id, short tc);
|
||||
|
||||
|
||||
MathInset * mathed_parse(string const &);
|
||||
MathInset * mathed_parse(std::istream &);
|
||||
MathInset * mathed_parse(LyXLex &);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user