tex2lyx: fix import of umlauts and ß in math (#12739)

This commit is contained in:
Juergen Spitzmueller 2023-04-14 19:13:23 +02:00
parent 27208273ef
commit 624a1be072
2 changed files with 18 additions and 11 deletions

View File

@ -213,17 +213,25 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
else if (t.cs() == "\"") { else if (t.cs() == "\"") {
string const name = p.verbatim_item(); string const name = p.verbatim_item();
if (name == "a") os << '\xe4'; LYXERR0("name: " << name);
else if (name == "o") os << '\xf6'; if (name == "a")
else if (name == "u") os << '\xfc'; os << "ä";
else if (name == "A") os << '\xc4'; else if (name == "o")
else if (name == "O") os << '\xd6'; os << "ö";
else if (name == "U") os << '\xdc'; else if (name == "u")
else os << "\"{" << name << "}"; os << "ü";
else if (name == "A")
os << "Ä";
else if (name == "O")
os << "Ö";
else if (name == "U")
os << "Ü";
else
os << "\"{" << name << "}";
} }
else if (t.cs() == "ss") else if (t.cs() == "ss")
os << "\xdf"; os << "ß";
else if (t.cs() == "cr") { else if (t.cs() == "cr") {
// lyx can't handle \\cr // lyx can't handle \\cr

View File

@ -54,8 +54,6 @@ What's new
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION
@ -66,7 +64,7 @@ What's new
* TEX2LYX * TEX2LYX
- Fix import of umlauts and ß in math (bug 12739).
* LYXHTML * LYXHTML
@ -82,3 +80,4 @@ What's new
* BUILD/INSTALLATION * BUILD/INSTALLATION
- update included boost library to version 1.75.0. - update included boost library to version 1.75.0.