10

The code

\documentclass{article}
\usepackage{mathtools}
\usepackage{MinionPro}
\begin{document}
  \[
  \underbracket{123}_{x}
  \underbracket[1pt]{123}_{x}
  \]
\end{document}

produces

enter image description here

If one comments out the line including MinionPro things go back to normal. Is there a way to avoid this?

2
  • Can you confirm that for the math symbols the MinionPro package loads MnSymbol?
    – egreg
    Sep 19, 2016 at 7:49
  • @egreg, yup it does. Sep 19, 2016 at 20:41

2 Answers 2

13

Let's look at the definition of \underbracket

\providecommand*\underbracket{
  \@ifnextchar[
    {\MT_underbracket_I:w}
    {\MT_underbracket_I:w[\l_MT_bracketheight_fdim]}}
\def\MT_underbracket_I:w[#1]{
  \@ifnextchar[
    {\MT_underbracket_II:w[#1]}
    {\MT_underbracket_II:w[#1][.7\fontdimen5\textfont2]}}
\def\MT_underbracket_II:w[#1][#2]#3{%
  \mathop{\vtop{\m@th\ialign{##
    \crcr
      $\hfil\displaystyle{#3}\hfil$%
    \crcr
      \noalign{\kern .2\fontdimen5\textfont2 \nointerlineskip}%
      \upbracketfill {#1}{#2}%
    \crcr}}}
  \limits}
\def\upbracketfill#1#2{%
  \sbox\z@{$\braceld$}
  \edef\l_MT_bracketheight_fdim{\the\ht\z@}%
  \upbracketend{#1}{#2}
  \leaders \vrule \@height \z@ \@depth #1 \hfill
  \upbracketend{#1}{#2}%
}
\def\upbracketend#1#2{\vrule \@height #2 \@width #1\relax}

We see that the command has two optional arguments; the default value for the optional arguments are, respectively, \l_MT_bracketheight_fdim and .7\fontdimen5\textfont2. Thus the call \underbracket{123} ends up into doing

\upbracketfill{\l_MT_bracketheight_fdim}{.7\fontdimen5\textfont2}

and those parameters are used nowhere else. The macro \upbracketfill defines \l_MT_bracketheight_fdim to be the same as the height of $\braceld$. This is the character used for terminating the \downbracefill operation connected to \overbrace (probably \bracelu should be used, but it doesn't really change the matter).

Now let's do an experiment (MinionPro uses MnSymbol for math):

\documentclass{article}
\usepackage{mathtools}
\usepackage{MnSymbol}
\begin{document}

\fboxsep=0pt % tight bounding box

x\fbox{$\braceld$}

x\fbox{$\bracelu$}

\end{document}

enter image description here

What do we get if we omit loading MnSymbol?

enter image description here

Do you see the problem? There are several, but in this context the main one is that the height of \braceld is huge. With the Computer Modern math font, the height of \braceld can be used as the height of the filler rule for \underbrace or \overbrace; this is not at all possible with MnSymbol and, indeed, MnSymbol changes the definitions of \underbrace, \overbrace and the connected macros.

What you can do is changing the default value to something still linked to the MnSymbol math fonts; here I use twice the thickness of the fraction line.

\documentclass{article}
\usepackage{mathtools}
\usepackage{MnSymbol}

\makeatletter
\MHInternalSyntaxOn
\def\upbracketfill#1#2{%
  \edef\l_MT_bracketheight_fdim{\the\dimexpr 2\fontdimen8\textfont3}%
  \upbracketend{#1}{#2}%
  \leaders \vrule \@height \z@ \@depth #1 \hfill
  \upbracketend{#1}{#2}%
}
\MHInternalSyntaxOff\showthe\catcode`@
\makeatother


\begin{document}

$\underbracket{123}_{x}$                           

\end{document}

enter image description here

2
  • Should I report this to the mathtools guys or to the MnSymbol guys? Sep 19, 2016 at 20:40
  • @MarianoSuárez-Álvarez That's a good question. ;-) I'd say MnSymbol, because they are changing \underbrace and \overbrace (more precisely, they don't make \braceld good for measuring things).
    – egreg
    Sep 19, 2016 at 20:50
0

In addition to the last comment I do use Minion Pro in LaTeX. MnSymbol is quite important but I also use MinionPro and mathalfa with this options:

\usepackage[mathlf,textlf,minionint,openg]{MinionPro} \usepackage[bb=lucida,bbscaled=1,cal=boondoxo]{mathalfa}

To obtain full numbers I use this

\documentclass{article}
\usepackage{mathtools}
\usepackage[mathlf,textlf,minionint,openg]{MinionPro}
\usepackage[bb=lucida,bbscaled=1,cal=boondoxo]{mathalfa}
\usepackage{MnSymbol}

\begin{document}
  \[
  \underbracket{123}_{x}
  \underbracket[1pt]{123}_{x}
  \]
\end{document}

And this is the result:

enter image description here

1
  • 1
    Welcome to TeX.SX! The question was not about the numbers.
    – egreg
    Sep 19, 2016 at 14:39

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.