wspr / breqn

Automatic line breaking in LaTeX equations
18 stars 2 forks source link

\premath in dseries drops real spaces with tgtermes and other fonts #39

Closed FrankMittelbach closed 4 years ago

FrankMittelbach commented 4 years ago

\premath drops spaces when they are less than .3em (I guess the assumption is that a normal space is bigger than that). However, that may not be the case as with tgtermes:

\documentclass[]{article}

\usepackage{tgtermes}
\usepackage{breqn}

\begin{document}
\begin{dseries}
%\makeatletter
%  \def\premath{%
%    \ifdim\lastskip<\fontdimen2\font \unskip
%    \else\ifnum\lastpenalty<\@M \dquad\fi\fi
%}%
%\makeatother
  \begin{math}A\end{math},
  \begin{math}B\end{math},
  and
  \begin{math}C\end{math}.
\end{dseries}
\end{document}

which gives

Screenshot 2020-03-12 at 14 07 13

Maybe better to compare to the space in current font directly (as indicated in the commentd out code)