4

Consider this MWE

\documentclass[border=10mm,varwidth=true]{standalone}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
%\usepackage{mathptmx}
\begin{document}
\[
\sqrt{n+1}\sqrt{2+(n+2)^2}
\]
\end{document}

As it stands with CM fonts we get

enter image description here

Adding mathptmx we get

enter image description here

Which is really horrible, especially it it scales like that in the text.

Any ideas on how to better control \sqrt with mathptmx (and no we cannot change the font package, it is what the publisher is using). Note that I'd like to not have to deal with a lot of messing with phantoms.

  • 1
    well, that's a bummer. it looks to me like the font size used for superscripts with times is just a tad larger than the computer modern setting, with the result that a superscript digit kicks the total height above the \sqrt-sizing threshold. try using (top) \smash on the superscript. (haven't tried it myself, so don't know if there will be side effects.) – barbara beeton Jun 28 '16 at 13:59
  • well, i did just try it; running under tex live 2012. and that doesn't happen -- the radical is the same relative size as for cm. likewise for tex live 2015. (we don't have 2016 installed yet.) – barbara beeton Jun 28 '16 at 14:09
5

The superscript to the parenthesis triggers using the second “next larger” character for the square root, not the first one like with CM. I guess it has to do with the height+depth of the parentheses.

You can smash the superscript.

\documentclass[border=10mm,varwidth=true]{standalone}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{mathptmx}
\begin{document}
\[
\sqrt{n+1}\sqrt{2+(n+2)^{\smash{2}}}
\]
\end{document}

enter image description here

The problem is the same with NewTX, I'm afraid; with MTPro2 it comes out right without smashing.

enter image description here

2

You can also trick sqrt by making the argument smaller and the entire square root bigger. This has the advantage of not having to adjust individual equations.

\documentclass[border=10mm,varwidth=true]{standalone}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{mathptmx}
\usepackage{relsize}
\newcommand{\sqroot}[1]{\mathlarger{\mathlarger{\sqrt{\mathsmaller{\mathsmaller{#1}}}}}}
\begin{document}
Original:
\[
\sqrt{n+1}\sqrt{2+(n+2)^2}
\]

New:
\[
\sqroot{n+1}\sqroot{2+(n+2)^2}
\]

\end{document}

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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