| 2242 | | #if 0 |
|---|
| 2243 | | //FIXME: rewrite this |
|---|
| 2244 | | else if (t.cs() == "\"") { |
|---|
| 2245 | | context.check_layout(os); |
|---|
| 2246 | | string const name = p.verbatim_item(); |
|---|
| 2247 | | if (name == "a") os << '\xe4'; |
|---|
| 2248 | | else if (name == "o") os << '\xf6'; |
|---|
| 2249 | | else if (name == "u") os << '\xfc'; |
|---|
| 2250 | | else if (name == "A") os << '\xc4'; |
|---|
| 2251 | | else if (name == "O") os << '\xd6'; |
|---|
| 2252 | | else if (name == "U") os << '\xdc'; |
|---|
| 2253 | | else handle_ert(os, "\"{" + name + "}", context); |
|---|
| 2254 | | } |
|---|
| 2255 | | #endif |
|---|
| 2256 | | |
|---|
| 2267 | | // The argument of InsetLatexAccent is parsed as a |
|---|
| 2268 | | // subset of LaTeX, so don't parse anything here, |
|---|
| 2269 | | // but use the raw argument. |
|---|
| 2270 | | // Otherwise we would convert \~{\i} wrongly. |
|---|
| 2271 | | // This will of course not translate \~{\ss} to \~{ÃÂ}, |
|---|
| 2272 | | // but that does at least compile and does only look |
|---|
| 2273 | | // strange on screen. |
|---|
| 2274 | | context.check_layout(os); |
|---|
| 2275 | | os << "\\i \\" << t.cs() << "{" |
|---|
| 2276 | | << trim(p.verbatim_item(), " ") |
|---|
| 2277 | | << "}\n"; |
|---|
| 2278 | | } |
|---|
| 2279 | | |
|---|
| 2280 | | #if 0 |
|---|
| 2281 | | //FIXME: rewrite this |
|---|
| 2282 | | else if (t.cs() == "ss") { |
|---|
| 2283 | | context.check_layout(os); |
|---|
| 2284 | | os << "\xdf"; |
|---|
| 2285 | | skip_braces(p); // eat {} |
|---|
| 2286 | | } |
|---|
| 2287 | | #endif |
|---|
| 2288 | | |
|---|
| 2289 | | else if (t.cs() == "i" || t.cs() == "j" || t.cs() == "l" || |
|---|
| 2290 | | t.cs() == "L") { |
|---|
| 2291 | | context.check_layout(os); |
|---|
| 2292 | | os << "\\i \\" << t.cs() << "{}\n"; |
|---|
| 2293 | | skip_braces(p); // eat {} |
|---|
| | 2253 | context.check_layout(os); |
|---|
| | 2254 | // try to see whether the string is in unicodesymbols |
|---|
| | 2255 | docstring rem; |
|---|
| | 2256 | string command = t.asInput() + "{" |
|---|
| | 2257 | + trim(p.verbatim_item()) |
|---|
| | 2258 | + "}"; |
|---|
| | 2259 | docstring s = encodings.fromLaTeXCommand(from_utf8(command), rem); |
|---|
| | 2260 | if (!s.empty()) { |
|---|
| | 2261 | if (!rem.empty()) |
|---|
| | 2262 | cerr << "When parsing " << command |
|---|
| | 2263 | << ", result is " << to_utf8(s) |
|---|
| | 2264 | << "+" << to_utf8(rem) << endl; |
|---|
| | 2265 | os << to_utf8(s); |
|---|
| | 2266 | } else |
|---|
| | 2267 | // we did not find a non-ert version |
|---|
| | 2268 | handle_ert(os, command, context); |
|---|
| 2560 | | string name = t.asInput(); |
|---|
| 2561 | | if (p.next_token().asInput() == "*") { |
|---|
| 2562 | | // Starred commands like \vspace*{} |
|---|
| 2563 | | p.get_token(); // Eat '*' |
|---|
| 2564 | | name += '*'; |
|---|
| 2565 | | } |
|---|
| 2566 | | if (! parse_command(name, p, os, outer, context)) |
|---|
| 2567 | | handle_ert(os, name, context); |
|---|
| | 2547 | else { |
|---|
| | 2548 | string name = t.asInput(); |
|---|
| | 2549 | if (p.next_token().asInput() == "*") { |
|---|
| | 2550 | // Starred commands like \vspace*{} |
|---|
| | 2551 | p.get_token(); // Eat '*' |
|---|
| | 2552 | name += '*'; |
|---|
| | 2553 | } |
|---|
| | 2554 | if (!parse_command(name, p, os, outer, context)) |
|---|
| | 2555 | handle_ert(os, name, context); |
|---|
| | 2556 | } |
|---|