+ std::string name;
+ switch (c) {
+ // Latex replaces ', *, -, and : with specific symbols. With unicode-math,
+ // these symbols are replaced respectively by ^U+2032, U+2217, U+2212 and
+ // U+2236 (the latter substitution can be turned off with a package
+ // option). Unicode-math also replaces ` with \backprime.
+ // prime needs to be placed in superscript unless an opentype font is used.
+ //case '\'':
+ //name = "prime";
+ //break;
+ case '*':
+ name = "ast";
+ break;
+ case '-':
+ name = "lyxminus";// unicode-math: "minus"
+ break;
+ case ':':
+ name = "ordinarycolon";// unicode-math: "mathratio"
+ break;
+ // The remaining replacements are not real character substitutions (from a
+ // unicode point of view) but are done here: 1. for cosmetic reasons, in the
+ // context of being stuck with CM fonts at the moment, to ensure consistency
+ // with related symbols: -, \leq, \geq, etc. 2. to get the proper spacing
+ // as defined in lib/symbols.
+ case '+':
+ name = "lyxplus";//unicode-math: "mathplus"
+ break;
+ case '>':
+ name = "lyxgt";//unicode-math: "greater"
+ break;
+ case '<':
+ name = "lyxlt";//unicode-math: "less"
+ break;
+ case '=':
+ name = "lyxeqrel";//unicode-math: "equal"
+ break;
+ //case ','://unicode-math: "mathcomma"
+ //case ';'://unicode-math: "mathsemicolon"
+ default:
+ return nullptr;
+ }
+ return in_word_set(from_ascii(name));