From 6a1f0655013368028d2a1c3dae3a7ef233ac8972 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 23 Nov 1999 15:59:07 +0000 Subject: [PATCH] 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 --- ChangeLog | 8 ++++++++ src/mathed/formula.C | 2 +- src/mathed/formula.h | 4 ++-- src/paragraph.C | 13 ++++++++----- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7630786ba..f090cf5ab0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-11-23 Jean-Marc Lasgouttes + + * 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 * src/support/lyxstring.h: made the methods that take iterators diff --git a/src/mathed/formula.C b/src/mathed/formula.C index 7362f3bfea..c73f54738a 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -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; diff --git a/src/mathed/formula.h b/src/mathed/formula.h index 05435250dc..33b190eb0e 100644 --- a/src/mathed/formula.h +++ b/src/mathed/formula.h @@ -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(); /// diff --git a/src/paragraph.C b/src/paragraph.C index 7e678743d5..84f97e7f07 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -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 ']': -- 2.39.2