breqn icon indicating copy to clipboard operation
breqn copied to clipboard

Lower case greek and mathit

Open imbrish opened this issue 11 years ago • 6 comments
trafficstars

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 Compiled code Upper case letters display fine.

imbrish avatar Aug 27 '14 21:08 imbrish

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}

jborme avatar Jul 05 '18 12:07 jborme

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.

jg110 avatar Apr 27 '20 19:04 jg110

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}

dryabov avatar May 26 '20 14:05 dryabov

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).

dryabov avatar May 26 '20 15:05 dryabov

BTW, the same is true for \imath and \jmath (both should be Ord).

dryabov avatar May 26 '20 15:05 dryabov

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.

wspr avatar May 27 '20 00:05 wspr