14

This following code produce very strange result:

\documentclass[12pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{amssymb}
\usepackage{amsmath}

\usepackage{mathabx}
\usepackage{mathtools}

\begin{document}
$$W_n(\underbrace{\mbox{\textvisiblespace},
                  \mbox{\textvisiblespace},
                  \dots,
                  \mbox{\textvisiblespace}
                 }_n 
     )
$$
\end{document}

If I just remove one of mathabx or mathtools the brace is displayed normally. Any ideas?

P.S. I use some symbols from mathabx and some commands from mathtools in the book, so I probably need both packages...

Nick
  • 275

3 Answers3

17

use it the other way round:

\usepackage{mathtools}
\usepackage{mathabx}
  • 5
    @Nick Note that it's not mathtools, but amsmath that redefines \underbrace. You'd get the same with loading mathabx before amsmath. – egreg Jun 04 '13 at 15:39
6

mathabx has wider effects that aren't always predicted. maybe using just the particular symbols you need, and not loading the entire package, would get rid of this problem (not tried).

good advice can be found at the question Importing a Single Symbol From a Different Font

  • I'd prefer this way since mathabx produces some more strange behaviour if loaded later too, looks like relsize doesn't work as expected. Extracting required fonts and symbols was easy and works perfect. – Nick Jun 05 '13 at 09:59
3

Mathtools redefines \underbrace and \overbrace, which leads to problems with some fonts. To access the original definitions, use \LaTeXunderbrace and \LaTeXoverbrace, respectively.