1

Quite often, especially when preparing slides, vertical space is precious. However, there is no automatic equivalent of "vertical kerning of lines", by which you would reduce or even have a negative line spacing when the highest elements of the lower line are on the right hand side while the upper line occupies only the left hand side.

A small example:

\begin{minipage}{7cm}
Equation:
$$a+b+c+d=\overbrace{x+y+z}^{\text{unknown}}$$
\end{minipage}

output of code

With commands such as \hphantom, you can have Latex not typeset the argument and reserve the space in bounding box. Can one do the reverse, display the overbrace above without updating the bounding box of the equation?

1
  • you can use \vspace{-1in} before the display, or \text{\smash{unknown} to hide the height of unknown or \smash{$\displaystyle a+.... to hide the height of the whole display or .... Commented Nov 6, 2015 at 17:32

1 Answer 1

3

Use \smash, maybe in connection with some \vphantom, which is not necessary in this case as the line already contains some non-smashed material. Of course you become responsible for avoiding clashes, but all presentations require some amount of visual formatting anyway.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{minipage}{7cm}
Equation:
\[
a+b+c+d=\smash{\overbrace{x+y+z}^{\text{unknown}}}
\]
\end{minipage}

\end{document}

Avoid $$ even in minipages.

enter image description here

You must log in to answer this question.

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