On Thu, Sep 22, 2016 at 01:07:28PM +0000, Guenter Milde wrote:
> 
> It still fails for \textdegree:
> 
>   - \textdegree in math-mode input as-is
>   - \textdegree in "mathematical text" wrapped in \ensuremath{}

This is because the MathMacro class was missing a currentMode method.
Fixed at 314e30d5.

> Unit symbols wrong when using a fraction in \text: 
> 
> \begin_inset Formula $50\,\text{\frac{m}{s}}$
> \end_inset
> 
> exported as
> 
>   $50\,\text{\ensuremath{\frac{m}{s}}}$
> 
> (upright in the GUI but italic in the output).

This is because \frac and many other commands are not recorded in the
mathed word list. They are manually inserted in the completion list
in InsetMathNest.cpp, but that list cannot be accessed by the Cursor
class. Because they are missing in the word list, they are taken to
be ERT macros and thus left as is. However, the export methods recognize
them as mathmode commands and correctly wrap them in \ensuremath.
I am thinking of a good way for solving this issue without having to
replicate the completion list.

-- 
Enrico

Reply via email to