Sometimes I want to plug in text using overbrace
/stackrel
inside an equation, and have it in more than one line. what is the most straightforward way to do it?
What I wish to have is in the picture below. My (somewhat dumb) workaround is:
\documentclass[a4paper]{article}
\usepackage{amsmath,times}
\begin{document}
$$e = \underbrace{m}_{\substack{\text{I wish this text}\\ \text{ to be in two lines}} }\cdot \underbrace{c^2}_{\text{and the same here} }$$
\end{document}
Any (better) solutions?
Thanks!
Best Answer
You could use
\parbox
instructions. In the following example, I use\Centering
(from theraggede
package) rather than the basic\centering
instruction, as\Centering
provides automatic line length balancing.