mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 16:31:13 +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"
|
"\\DeclareRobustCommand{\\textcyr}[1]{\\leavevmode{\\cyrtext #1}}\n"
|
||||||
"\\DeclareFontEncoding{T2A}{}{}\n";
|
"\\DeclareFontEncoding{T2A}{}{}\n";
|
||||||
|
|
||||||
static string const mathsym_def =
|
static string const lyxmathsym_def =
|
||||||
"\\DeclareRobustCommand{\\mathsym}[1]{%\n"
|
"\\DeclareRobustCommand{\\lyxmathsym}[1]{%\n"
|
||||||
" \\begingroup\n"
|
" \\begingroup\n"
|
||||||
" \\edef\\b@ld{bold}%\n"
|
" \\edef\\b@ld{bold}%\n"
|
||||||
" \\def\\rmorbf##1{\\ifx\\math@version\\b@ld\\textbf{##1}\\else\\textrm{##1}\\fi}%\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"))
|
if (mustProvide("textcyr"))
|
||||||
macros << textcyr_def << '\n';
|
macros << textcyr_def << '\n';
|
||||||
|
|
||||||
if (mustProvide("mathsym"))
|
if (mustProvide("lyxmathsym"))
|
||||||
macros << mathsym_def << '\n';
|
macros << lyxmathsym_def << '\n';
|
||||||
|
|
||||||
// quotes.
|
// quotes.
|
||||||
if (mustProvide("quotesinglbase"))
|
if (mustProvide("quotesinglbase"))
|
||||||
|
@ -142,7 +142,7 @@ void InsetMathChar::validate(LaTeXFeatures & features) const
|
|||||||
if (char_ >= 0x80) {
|
if (char_ >= 0x80) {
|
||||||
encodings.validate(char_, features);
|
encodings.validate(char_, features);
|
||||||
features.require("relsize");
|
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 cit = str_.begin();
|
||||||
docstring::const_iterator end = str_.end();
|
docstring::const_iterator end = str_.end();
|
||||||
|
|
||||||
bool in_mathsym = false;
|
bool in_lyxmathsym = false;
|
||||||
while (cit != end) {
|
while (cit != end) {
|
||||||
char_type const c = *cit;
|
char_type const c = *cit;
|
||||||
try {
|
try {
|
||||||
if (c < 0x80) {
|
if (c < 0x80) {
|
||||||
if (in_mathsym) {
|
if (in_lyxmathsym) {
|
||||||
os << '}';
|
os << '}';
|
||||||
in_mathsym = false;
|
in_lyxmathsym = false;
|
||||||
}
|
}
|
||||||
os << docstring(1, c);
|
os << docstring(1, c);
|
||||||
} else if (can_encode) {
|
} else if (can_encode) {
|
||||||
if (!in_mathsym) {
|
if (!in_lyxmathsym) {
|
||||||
os << "\\mathsym{";
|
os << "\\lyxmathsym{";
|
||||||
in_mathsym = true;
|
in_lyxmathsym = true;
|
||||||
}
|
}
|
||||||
os << encit->latexChar(c, true);
|
os << encit->latexChar(c, true);
|
||||||
} else {
|
} else {
|
||||||
@ -149,7 +149,7 @@ void InsetMathString::write(WriteStream & os) const
|
|||||||
}
|
}
|
||||||
++cit;
|
++cit;
|
||||||
}
|
}
|
||||||
if (in_mathsym)
|
if (in_lyxmathsym)
|
||||||
os << '}';
|
os << '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user