mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
Fix in symbols handling: parse the XML entity with \def.
This commit is contained in:
parent
718eede94b
commit
8f89768211
20
lib/symbols
20
lib/symbols
@ -16,9 +16,9 @@
|
||||
# or
|
||||
# \def\macroname{definition} requires
|
||||
# or
|
||||
# \def\macroname{definition} extra xmlname
|
||||
# \def\macroname{definition} extra htmlname xmlname
|
||||
# or
|
||||
# \def\macroname{definition} extra xmlname requires
|
||||
# \def\macroname{definition} extra htmlname xmlname requires
|
||||
#
|
||||
# ("" for empty strings is not supported. One would have to use x for fields
|
||||
# that are not set.)
|
||||
@ -999,12 +999,12 @@ bignplus stmry 112 0 mathop x x stmaryrd # caution: named huge
|
||||
\def\Arrownot{\lyxArrownot\mathrel{\kern0.5mu}} stmaryrd
|
||||
\def\longarrownot{\mathrel{\kern5.5mu}\arrownot\mathrel{\kern-5.5mu}} stmaryrd
|
||||
\def\Longarrownot{\mathrel{\kern5.5mu}\Arrownot\mathrel{\kern-5.5mu}} stmaryrd
|
||||
\def\Mapsto{\Mapstochar\mathrel\Rightarrow} mathrel ⤇ stmaryrd
|
||||
\def\mapsfrom{\leftarrow\kern-9mu\mapsfromchar} mathrel ↤ stmaryrd
|
||||
\def\Mapsfrom{\Leftarrow\kern-9mu\Mapsfromchar} mathrel ⤆ stmaryrd
|
||||
\def\Longmapsto{\Mapstochar\Longrightarrow} mathrel ⟾ stmaryrd
|
||||
\def\longmapsfrom{\longleftarrow\mapsfromchar} mathrel ⟻ stmaryrd
|
||||
\def\Longmapsfrom{\Longleftarrow\mathrel{\kern1mu}\Mapsfromchar} mathrel ⟽ stmaryrd
|
||||
\def\Mapsto{\Mapstochar\mathrel\Rightarrow} mathrel ⤇ ⤇ stmaryrd
|
||||
\def\mapsfrom{\leftarrow\kern-9mu\mapsfromchar} mathrel ↤ ↤ stmaryrd
|
||||
\def\Mapsfrom{\Leftarrow\kern-9mu\Mapsfromchar} mathrel ⤆ ⤆ stmaryrd
|
||||
\def\Longmapsto{\Mapstochar\Longrightarrow} mathrel ⟾ ⟾ stmaryrd
|
||||
\def\longmapsfrom{\longleftarrow\mapsfromchar} mathrel ⟻ ⟻ stmaryrd
|
||||
\def\Longmapsfrom{\Longleftarrow\mathrel{\kern1mu}\Mapsfromchar} mathrel ⟽ ⟽ stmaryrd
|
||||
|
||||
# symbols from the mhchem package, all of them are equivalent to a math symbol
|
||||
# mhchem is not loaded because these commands can only be used inside
|
||||
@ -1159,8 +1159,8 @@ ordinarycolon cmr 58 58 mathrel : : mathtools
|
||||
\def\lnot{\neg} mathord ¬ ¬
|
||||
\def\notin{\not\in} mathrel ∉ ∉
|
||||
|
||||
\def\ddag{\ddagger} mathbin ‡
|
||||
\def\dag{\dagger} mathbin †
|
||||
\def\ddag{\ddagger} mathbin ‡ ‡
|
||||
\def\dag{\dagger} mathbin † †
|
||||
|
||||
\def\joinrel{\mathrel{\kern-3mu}}
|
||||
\def\relbar{\lyxbar}
|
||||
|
@ -186,23 +186,24 @@ void initSymbols()
|
||||
// or
|
||||
// \def\macroname{definition} requires
|
||||
// or
|
||||
// \def\macroname{definition} extra htmlname requires
|
||||
// \def\macroname{definition} extra htmlname xmlname requires
|
||||
istringstream is(line);
|
||||
string macro;
|
||||
string required;
|
||||
string extra;
|
||||
string htmlname;
|
||||
string xmlname;
|
||||
bool hidden = false;
|
||||
is >> setw(65536) >> macro >> required;
|
||||
if ((is >> htmlname)) {
|
||||
if ((is >> htmlname >> xmlname)) {
|
||||
extra = required;
|
||||
if (!(is >> required))
|
||||
required = "";
|
||||
} else
|
||||
htmlname = "";
|
||||
htmlname = xmlname = "";
|
||||
MacroTable::iterator it = MacroTable::globalMacros().insert(
|
||||
0, from_utf8(macro));
|
||||
if (!extra.empty() || !htmlname.empty() || !required.empty()) {
|
||||
if (!extra.empty() || !htmlname.empty() || !xmlname.empty() || !required.empty()) {
|
||||
MathWordList::iterator wit = theMathWordList.find(it->first);
|
||||
if (wit != theMathWordList.end())
|
||||
LYXERR(Debug::MATHED, "readSymbols: inset "
|
||||
@ -213,6 +214,7 @@ void initSymbols()
|
||||
tmp.name = it->first;
|
||||
tmp.extra = from_utf8(extra);
|
||||
tmp.htmlname = from_utf8(htmlname);
|
||||
tmp.xmlname = from_utf8(xmlname);
|
||||
if (required == "hiddensymbol") {
|
||||
required = "";
|
||||
tmp.hidden = hidden = true;
|
||||
@ -230,6 +232,7 @@ void initSymbols()
|
||||
<< " draw: 0"
|
||||
<< " extra: " << extra
|
||||
<< " html: " << htmlname
|
||||
<< " xml: " << xmlname
|
||||
<< " requires: " << required
|
||||
<< " hidden: " << hidden << '\'');
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user