Fix 12966. A few notes:
* we need to consider both regular insets and argument insets.
* in passthru layouts (such as verbatim) parentheses still need
to be reversed.
* all arguments of type 'listpreamble' are passthru (this isn't a rule,
this is just what happen in practice).
* custom layout and insets from the local layout, or a custom module
are not considered.
Signed-off-by: Udi-Fogiel <udifoglle@gmail.com>
This fixes, for example, the following ctests:
export/doc/ja/Customization_pdf4_systemF
export/doc/ja/Customization_pdf5_systemF
Consistent with ffe5d61b.
The \underbar macro is a text mode macro that can also be used
in math mode. However, when inserting it in mathed, LyX helpfully
wraps it in a \text inset. One can dissolve such text inset and
the macro would appear in math mode without any problem. But the
output routine thinks that the user is shooting itself in the
foot and tries to protect him by wrapping \underbar in the
\lyxmathsym macro, whose definition is normally added to the
preamble when an unicode character is used in math mode.
Of course, this is not the case for \underbar and a compile
error arises. The easier solution is to simply add lyxmathsym as
a requirement for \underbar in lib/symbols, but this means
that the definition of \lyxmathsym would be added even when not
necessary (because in the validation routine we miss the info
about the current mode). The correct solution is acknowledging
the dual nature of \underbar as a text-mode macro that can also
be used in math mode. Luckily the correct solution is almost as
easy as the easier one and is what is done in this commit.
This is only needed for very old versions of the nomencl package
(before March 2005)
No need to output compatibility code with newer versions
Furthermore, this breaks the use of the glossary package which also
has .glo extension (#12968)
Until now only the color of the text could be changed by using
the text properties dialog. This commit allows changing all
other properties except for strikethrough. It is possible to
also add underlining with the limitation that the changes
accumulate. This requires other work but I think that underlining
and strikethrough are not so important in mathed and can be
refined at a later time.
Fixes#12958