Output ~ and ^ with the proper latex macro; add a few missing 'const'.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@331 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 1999-11-23 15:59:07 +00:00
parent 4866387e32
commit 6a1f065501
4 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,11 @@
1999-11-23 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/mathed/formula.[Ch] (GetCursorPos): add a missing 'const'.
(EditMessage): likewise.
* src/paragraph.C (SimpleTeXSpecialChars): output ~ and ^
respectively as \textasciitilde and \textasciicircum.
1999-11-22 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/support/lyxstring.h: made the methods that take iterators

View File

@ -507,7 +507,7 @@ void InsetFormula::InsertSymbol(char const* s)
UpdateLocal();
}
void InsetFormula::GetCursorPos(int& x, int& y)
void InsetFormula::GetCursorPos(int& x, int& y) const
{
mathcursor->GetPos(x, y);
x -= par->xo;

View File

@ -70,7 +70,7 @@ public:
}
/// what appears in the minibuffer when opening
char const * EditMessage() {return _("Math editor mode");}
char const * EditMessage() const {return _("Math editor mode");}
///
void Edit(int x, int y);
///
@ -84,7 +84,7 @@ public:
///
void HideInsetCursor();
///
void GetCursorPos(int &, int &);
void GetCursorPos(int &, int &) const;
///
void ToggleInsetSelection();
///

View File

@ -3445,11 +3445,14 @@ void LyXParagraph::SimpleTeXSpecialChars(string & file, TexRow & texrow,
column += 1;
break;
case '^': case '~':
file += '\\';
file += c;
file += "{}";
column += 3;
case '~':
file += "\\textasciitilde{}";
column += 16;
break;
case '^':
file += "\\textasciicircum{}";
column += 17;
break;
case '*': case '[': case ']':