7

I've found a strange behavior of newtxmath package. Using my code with documentclass[12pt]all commas are glued to the next letter, which can be hard to read: 12 pt

When I changedocumentclass[11pt] everything looks very nice: 11pt

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage{newtxmath}

\begin{document}

\begin{equation}
Q_i=Q_{inf,i}+Q_{vent,i}+Q_{g,c,i}
\end{equation}
\end{document}

Could someone help me with this issue ?

1 Answer 1

8

The following pictures explain the problem, which should brought to the attention of the package maintainer. The comma in the math letters font (family 1) has a wrong bounding box

With newtxmath

\documentclass[12pt]{article}
\usepackage{newtxmath}
\begin{document}
% draw a tight bounding box with hairline rules
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{0.1pt}
\fbox{$,$}
\end{document}

enter image description here

Without newtxmath

\documentclass[12pt]{article}
\begin{document}
% draw a tight bounding box with hairline rules
\setlength{\fboxsep}{0pt}
\setlength{\fboxrule}{0.1pt}
\fbox{$,$}
\end{document}

enter image description here

Workaround

Use the comma from the text font

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage{newtxtext,newtxmath}

\DeclareMathSymbol{,}{\mathpunct}{operators}{"2C}                  
\begin{document}

\begin{equation}
Q_i=Q_{inf,i}+Q_{vent,i}+Q_{g,c,i}
\end{equation}
\end{document}

enter image description here

4
  • There's definitely an issue with an incorrect bounding box for the math comma of the newtxmath package. Is there maybe a secondary anomaly present as well, since the awful comma positioning happens only at 12pt but not at 11pt or 10pt?
    – Mico
    Commented Feb 16, 2014 at 23:30
  • 2
    @Mico Indeed! The font used is rtxmi.pfb with the 12pt class option, but rtxmi7.pfb with the 10pt or 11pt options. The bounding box drawing was created with the 12pt option, that I forgot to add.
    – egreg
    Commented Feb 16, 2014 at 23:38
  • @egreg your answer solve my problem. Thank you! In the meantime I've found another workaround. I does not repair bounding box but makes the equation looks fine, using \usepackage[libertine]{newtxmath}
    – Michal
    Commented Feb 17, 2014 at 16:21
  • @MichaelSharpe have you seen this? Commented Mar 2, 2014 at 4:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .