breqn
breqn copied to clipboard
Lower case greek and mathit
I've just found out that if I combine breqn with mathit and lower case greek letters I get weird results.
For example
\documentclass{article}
\usepackage{breqn}
\begin{document}
\begin{math}\mathit{\pi}\end{math}
\end{document}
Compiles to
Upper case letters display fine.
This also happens with \mathrm{}, \it, \bf. It does not require one to use the dmath environment, loading the breqn package in the preamble is enough. The following produces the same buggy output (\pi compiles to the same as \ss).
\documentclass{article}
\usepackage{breqn}
\begin{document}
$\mathrm{\pi}$
\end{document}
Checking in to report that this is still a bug, in my case with \mathbf. Including the breqn package in the document makes all of my lower case Greek letters with \mathbf turn into random other characters inside equation environments, even without using any dmath environments in my document.
My distribution is texlive from the Fedora repository.
The \pi is expanded into \mathchar"0119 without breqn, and into \mathchar"7119 with it. I'm not sure, but most likely it is necessary to change the category of greek letters from Var to Ord. The following code after \usepackage{breqn} fixes the problem:
\DeclareFlexSymbol{\pi}{Ord}{greek}{19}
Uppercase Greek letters should be of Var category (see https://github.com/wspr/breqn/blob/master/flexisym.dtx#L789-L799 - correct), but lowercase Greek letters should be Ord (see https://github.com/wspr/breqn/blob/master/flexisym.dtx#L824-L852 - incorrect).
BTW, the same is true for \imath and \jmath (both should be Ord).
Thanks much for the detailed feedback here, really appreciate it. Unfortunately it will take me some time to make these changes and add test files — sorry for the inconvenience.