On Tue, Mar 31, 2009 at 08:07:44AM +0000, Guenter Milde wrote: > On 2009-03-31, Enrico Forestieri wrote: > > >> Partly revert r28731 (see discussion in bug 5836). > >> Essentially, it is not true that Cyrillic characters in math are to be > >> typeset in italic by default, and LyX already permits to style them as > >> desired. > > > Jürgen, may I apply the good bits of r28731 to branch? Patch attached. > > This patch provides a simplified definition of \lyxmathsym (leaving the > > output unchanged) and better reimport from latex. ATM, when importing > > from latex $\lyxmathsym{\textdegree§}$ one gets $°\lyxmathsym{§}$, i.e., > > an ugly red \lyxmathsym macro, because only latex commands were recognized. > > Example latex file attached, too. > > Could we simply use AMS \text instead of \lyxmathsym? > Maybe with \ProvideCommand fallback definition in case the amsmath > package is not available.
The \lyxmathsym macro also takes care of boldening symbols when using \boldsymbol (Ctrl+Alt+B), but otherwise is now a wrapper around AMS \text. > Or, maybe we can do an input check and place all characters that are not > supported in math in a text-in-math box? This would give immediate > feedback to the user and facilitate styling "the lyx way". I think that \lyxmathsym is the easiest way to the uninitiated for entering unicode symbols in math. It is also quite unintrusive as it enters the game only at export time and almost always does the right thing. The moment it comes in ones way, it can easily be taken away by "\renewcommand{\lyxmathsym}{}" in user preamble. So, I think that it is useful and not dangerous. -- Enrico