mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
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
This commit is contained in:
parent
16ad4a928d
commit
3e95457d4c
@ -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"))
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 << '}';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user