current font parameters are not updated in math equations

Enrico Forestieri forenr at lyx.org
Sun Jun 9 11:42:27 UTC 2024


On Sun, Jun 09, 2024 at 01:36:39AM +0300, Udicoudco wrote:
>Hello all,
>
>I've got a report on a strange behaviour of textstyle-update in LyX 2.4.0.
>If I select a character (say a) in math equation, then execute
>textstyle-update color 3
>in LyX 2.3 is simply turned the character into blue, and in th LaTeX
>source I see
>{\color{blue}a} as expected, but with LyX 2.4.0 the character is also
>turning upright instead
>of staying italic, and the LaTeX source shows
>
>{\color{blue}{\normalsize \mathrm{\mathrm{\mathrm{a}}}}}
>
>which is probably undesired.

Should be fixed at afb70c90.

>To me, it looks like the text in equations does not update any 
>parameters
>of the current font.
>
>The changes in the LaTeX source can be explained by 58103cf, but this
>commit is not the fault, it just worsen the symptoms.

Yes, this was also broken in 2.3. The code simply expected all text 
properties to be specified instead of just some of them. In 2.3 only the 
color was taken into account and thus the breakage was limited to that 
case only. However, using the text properties dialog everything should 
have worked right.

>If I create a blue character then select it and execute 
>textstyle-update series bold,

Note that the code is expecting numerical parameters, so that 
"textstyle-update series bold" does not work. One should use 
"textstyle-update series 1", instead.

-- Enrico


More information about the lyx-devel mailing list