Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 ?

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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

share|improve this answer
    
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 Feb 16 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 Feb 16 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 Feb 17 at 16:21
    
@MichaelSharpe have you seen this? –  Paul Gessler Mar 2 at 4:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.