Several changes are needed to get things right:
* nested supersripts only work with inheritFonts=true.
* to get caret position right, it is necessary to remember the outside
font of the inset before computing metrics.
* to get the size right at insertion time, it is necessary to trigger
a metrics computation just after inset insertion.
While math style (scriptstyle,...) is not really something that can be
set, it is useful for text subscripts and superscripts and therefore
it makes sense to handle it in some places.
With this change, style is still not a first class feature, but good
enough for now. In particular, it is taken into account in update().
* "platex" fails with "inputencoding default", if there is text in other languages.
"jis-platex" works fine, "jis-utf8" fails with German Umlauts (maybe more).
* The expert setting "inputencoding default" switches the inpute encoding
with language switches without marking this in the LaTeX source.
It is rarely required (if ever) and makes documents easy to break.
It is not required for AMS Books, Simple CV, ... (probabely a tex2lyx issue).
"utf8" and "auto" work fine.
Instead of the weird corner line, display a pilcrow sign (even when
disabled in prefs) to mark inserted/deleted end of paragraph.
Incidentally, this fixes the recent placement bug of the corner line.
Now only the languages available for the selected file are displayed.
By default, LyX pre-selects the GUI language (and falls back to English
if this is not available). Once another language has been selected by
the user, this one is preferred before the GUI language (and the English
fallback).
This seems to be necessary on windows, where math editing can get very
slow. Note that other methods like rbearing already use a cache.
In the future all these caches for single characters shall be unified.
* Fix macro termination if \textcyrillic or \textgreek is not required
for Greek or Cyrillic letter.
* Replace "writeScriptChars" with conditionals in the character-output loop in
"Paragraph::latex" (solves "FIXME: modifying i here is not very nice...").
The font changing commands \textcyrillic and \textgreek are no longer
part of the textcommand in "lib/unicodesymbols" but added when required
in Paragraph::Private::latexSpecialChar.