I recently installed math professional II font (mtpro2 lite). It works fine except that the SQRT with root index sucks.

\[ \sqrt[100]{1000000} = 1000 \quad \sqrt[3]{1000000} = 100 \]

\[ \SQRT[100]{1000000} = 1000 \quad \SQRT[3]{1000000}= 100 \]



Is this a problem of the lite version (intended or not)? Does the complete version have this problem too? How can I define a new command to handle the situation automatically?

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Martin Schröder Jul 29 '15 at 8:35
  • 1
    I can confirm that the full mtpro2 package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015. – Mico Jul 29 '15 at 11:04
  • Yup, same here. – JPi Jul 30 '15 at 2:44

Don't know exactly why this fixes the problem, but it seems to. ;-)



\newcommand{\SQRTFIX}[2][ ]{{\hphantom{\scriptscriptstyle{#1}}}\SQRT[\mathllap{#1}]{#2}}


\[ \sqrt[100]{1000000} = 1000 \quad \sqrt[3]{1000000} = 100 \]

 \SQRT[100]{1000000}  = 1000  \quad \SQRT[3]{1000000} = 100 

 \SQRTFIX[100]{1000000} =1000 \quad \SQRTFIX[3]{1000000} = 100 

enter image description here

The second image simply shows in the yellow box what the original $\SQRT$ does and in the blue box what $\SQRTFIX$ does.

enter image description here

  • 1
    Good eyesight! Thanks to you, I was able to track down the bug in the mtpro2 package. – Ruixi Zhang Mar 13 at 3:04

Thanks to @JPi’s amazing eyesight, I was able to track down exactly the bug in the mtpro2 package. All credits goes to him/her.

@JPi’s solution suggests that the offsetting space is somehow the width of the root index. I confirm this is the case. The root index is placed inside a box called \rootbox. Here is how LaTeX defines its placement:

% From ltmath.dtx:
  \dimen@\ht\z@ \advance\dimen@-\dp\z@

which is the default, while mtpro2 does some similar things like:

% From mtpro2.dtx or mtpro2.sty
\setbox\tw@\hbox{$\m@th#1\mskip\UPROOT@ mu$}\advance\dimen@ii by1.667\wd\tw@
\mkern1mu\kern.13\dimen@\mkern-\LEFTROOT@ mu
\raise.5\dimen@ii\copy\rootbox % was .44
\mkern-1mu\kern-.13\dimen@\mkern\LEFTROOT@ mu\box\z@\kern-\wd\rootbox

Focusing on the overall structures, we see immediately that \R@@T has additional code of \kern-\wd\rootbox, which IMHO is utterly wrong. So here is my fix:

\usepackage{mtpro2}% lite or complete, does not matter here

  {\kern-\wd\rootbox} % search this within \R@@T
  {} % replace it with nothing

\[ \sqrt[100]{1000000} = 1000 \quad \sqrt[3]{1000000} = 100 \]
\[ \SQRT[100]{1000000} = 1000 \quad \SQRT[3]{1000000} = 100 \]


Note: \sqrt and \SQRT, by design, will produce slightly different results (as seen in the above picture). \SQRT is supposed to be used for really large formulae (hence the awkward root index placement). Please refrain from using \SQRT for small formulae.

  • Wow! Thanks for doing this! – JPi Mar 13 at 11:47
  • 1
    @JPi You are welcome! I have been investigating my complete font set for almost two months now. It all started with me trying to scale MathTime (see also Scaling the mtpro2 fonts to work with Baskerville). So far, I have found 13+ errors in the LaTeX support package… – Ruixi Zhang Mar 13 at 20:15
  • 1
    I made a list of the 13+ bugs in a developing file mtpro2-patch.tex (Warning: Repository is mostly Chinese, but this file is in English). It is, for the most part, for my personal use. So the instructions inside were telling you to modify mtpro2.sty directly for yourself. However, the fixes for \undercbrace and \overcbrace (among other things) were deemed too complicated so I provided new definitions. – Ruixi Zhang Mar 13 at 20:25

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.