2

I'm using \overbace for some math formulas. At the begining everything works properly, but now when I compile file with an \overbrace I have some problem with the display of brackets.

For example, this line of code

$A'' = \langle Q', \Sigma, \delta', q_I', \overbrace{Q' \setminus F'}^{(F')^C}\rangle$

produces the following PDF: Result of \overbrace

Why does it display that awful black box over the bracket? I'm using TeX Live 2020

EDIT: This is the file:

\documentclass[a4paper, 11pt]{book}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english, italian]{babel}
\usepackage{subfiles}
\usepackage{braket}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{fdsymbol}
\usepackage{stmaryrd}
\usepackage{tabularx}
\usepackage{latexsym}
\usepackage{tikz}
\usepackage{thmtools}
\usepackage{mathtools}
\usepackage{hyperref}
\usepackage{graphicx}
\begin{document}
    Se $A'$  è un DFA allora avremo che 
    $A'' = \langle Q', \Sigma, \delta', q_I', \overbrace{Q' \setminus F'}^{(F')^C}\rangle$.
    Si ha che $A''$ è un DFA e si ha che $sc(L'') = sc(L')$.
\end{document}
5
  • as always on the site: post a full but minimal example that others can test as is. Also specify which latex installation you are using. Unrelated <> are not the correct symbols here, use \langle and \rangle
    – daleif
    Jun 18, 2020 at 9:52
  • Welcome to TeX SX! I don't understand what happened, but testing whether there was a conflict between packages, I commented most packages that seemed unnecessary to typeset your formula, and this solved the problem. Then I decommented one after the other, and the problem remained solved. Unrelated: hyperref should be loaded as the last package, with very few exceptions. Also, you don't have to load latexsym if you load amsfonts, nor amsmath if you load mathtools.
    – Bernard
    Jun 18, 2020 at 10:15
  • @MarcoMantovani Please show this information in your question and minimize your code example accordingly.
    – albert
    Jun 18, 2020 at 10:45
  • Ok, solved. Simply I move \usepackage{fdsymbol} as the last import before \usepackage{hyperref} Jun 18, 2020 at 10:56
  • I assumed that the problem was bad font metrics (bounding boxes) for the fdsymbols fonts. I don't have any idea now, seeing how the ordering fixed the problem. Jun 18, 2020 at 11:05

1 Answer 1

1

First a caveat. Using fdsymbol changes all math symbols, using shapes that are not really compatible with Computer Modern. They're thought to accompany the Fedra typeface.

Your problem arises because fdsymbol redefines \underbrace and \overbrace, but mathtools changes them again using some assumptions that don't hold when the symbol font is provided by fdsymbol.

So load fdsymbol after mathtools (assuming you want to load it to begin with).

1
  • If one can't change the load order of the mathtools package, e.g. b/c one is using an external document class, one can also restore the original \overbrace and \underbrace with \let\underbrace\LaTeXunderbrace \let\overbrace\LaTeXoverbrace, as documented in the mathtools documentation. Dec 9, 2020 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .