From 3e95457d4c185213c415b9a7b0d85c48c077aa77 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 1 Jun 2008 14:11:36 +0000 Subject: [PATCH] Rename \mathsym -> \lyxmathsym in order to avoid potential clashes. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25049 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LaTeXFeatures.cpp | 8 ++++---- src/mathed/InsetMathChar.cpp | 2 +- src/mathed/InsetMathString.cpp | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 3d7b11a61f..e31fc75c31 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -199,8 +199,8 @@ static string const textcyr_def = "\\DeclareRobustCommand{\\textcyr}[1]{\\leavevmode{\\cyrtext #1}}\n" "\\DeclareFontEncoding{T2A}{}{}\n"; -static string const mathsym_def = - "\\DeclareRobustCommand{\\mathsym}[1]{%\n" +static string const lyxmathsym_def = + "\\DeclareRobustCommand{\\lyxmathsym}[1]{%\n" " \\begingroup\n" " \\edef\\b@ld{bold}%\n" " \\def\\rmorbf##1{\\ifx\\math@version\\b@ld\\textbf{##1}\\else\\textrm{##1}\\fi}%\n" @@ -654,8 +654,8 @@ string const LaTeXFeatures::getMacros() const if (mustProvide("textcyr")) macros << textcyr_def << '\n'; - if (mustProvide("mathsym")) - macros << mathsym_def << '\n'; + if (mustProvide("lyxmathsym")) + macros << lyxmathsym_def << '\n'; // quotes. if (mustProvide("quotesinglbase")) diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp index 857dbcea90..e7c590ca2c 100644 --- a/src/mathed/InsetMathChar.cpp +++ b/src/mathed/InsetMathChar.cpp @@ -142,7 +142,7 @@ void InsetMathChar::validate(LaTeXFeatures & features) const if (char_ >= 0x80) { encodings.validate(char_, features); features.require("relsize"); - features.require("mathsym"); + features.require("lyxmathsym"); } } diff --git a/src/mathed/InsetMathString.cpp b/src/mathed/InsetMathString.cpp index 0599ef79de..cf5d7e179c 100644 --- a/src/mathed/InsetMathString.cpp +++ b/src/mathed/InsetMathString.cpp @@ -115,20 +115,20 @@ void InsetMathString::write(WriteStream & os) const docstring::const_iterator cit = str_.begin(); docstring::const_iterator end = str_.end(); - bool in_mathsym = false; + bool in_lyxmathsym = false; while (cit != end) { char_type const c = *cit; try { if (c < 0x80) { - if (in_mathsym) { + if (in_lyxmathsym) { os << '}'; - in_mathsym = false; + in_lyxmathsym = false; } os << docstring(1, c); } else if (can_encode) { - if (!in_mathsym) { - os << "\\mathsym{"; - in_mathsym = true; + if (!in_lyxmathsym) { + os << "\\lyxmathsym{"; + in_lyxmathsym = true; } os << encit->latexChar(c, true); } else { @@ -149,7 +149,7 @@ void InsetMathString::write(WriteStream & os) const } ++cit; } - if (in_mathsym) + if (in_lyxmathsym) os << '}'; }