3

I have two sets of equations in an align* environment and they are all just how I want them, but I want to draw an underbrace from the left bottom equation to the right bottom equation, but it throws errors whenever I use & inside the underbrace argument. Is there a workaround?


MWE:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}
    \begin{align*}
    \text{Kin}&\text{ematics} &\ \ \ \ && \text{Rot}&\text{ation Kinematics}\\
    x &= x_ot+v_ot+\frac{1}{2}at^2 &&& \theta &= \theta_ot\omega_ot+\frac{1}{2}\alpha t^2\\
    v &= v_ot+at &&& \omega &= \omega_ot \alpha t\\
    % \underbrace{v^2 &= v_o^2+2a \Delta x &&& \omega^2 &= \omega_o^2 + 2 \alpha \Delta \theta}_{\text{Variables get replaced as per the table}}\\
    \end{align*}
\end{document}

The above code works perfectly until the last line is uncommented.

1
  • It can be cheated in certain ways, but I'd rather advise to redesign what ever it is your are trying to typeset. Often things set with \underbrace are better left of as text instead. Also that \text{Kin}&\text{ematics} is not a good solution. You loose kerning.
    – daleif
    Dec 3, 2014 at 11:23

2 Answers 2

4

Some thing like this:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}
    \begin{align*}
    \underbrace{
    \begin{alignedat}{2}
    &\text{\rlap{Kinematics}} &  \text{\rlap{Rotation Kinematics}} &  \\
    x &= x_ot+v_ot+\frac{1}{2}at^2 & \qquad\qquad\qquad  \theta &= \theta_ot\omega_ot+\frac{1}{2}\alpha t^2\\
    v &= v_ot+at & \omega&= = \omega_ot \alpha t\\
    v^2 &= v_o^2+2a \Delta x &  \omega^2 &= \omega_o^2 + 2 \alpha \Delta \theta
    \end{alignedat}
    }_{\text{Variables get replaced as per the table}}
    \end{align*}
\end{document}

enter image description here

4
  • I'm not sure you're helping people by using input such as \omega_o² + 2 αΔθ
    – egreg
    Dec 3, 2014 at 11:46
  • @egreg Sorry for that, my editor does that and now I am on that editor only. I will change it later when I am on other editor.
    – user11232
    Dec 3, 2014 at 11:48
  • @egreg OK changed.
    – user11232
    Dec 3, 2014 at 11:56
  • since you've reduced this to a single box, equation* or even \[ ... \] should do as well. Dec 3, 2014 at 13:54
1

Here, I save the align* in a temporary \vbox and then stack under it. The [-23pt] controls the vertical separation of the underbrace; the to 270pt controls the length of the underbrace; and the {30pt} controls the horizontal placement of the underbrace.

\documentclass[12pt]{article}
\usepackage{amsmath,stackengine,lipsum}
\stackMath
\begin{document}
\lipsum[1]

\setbox0=\vbox{
    \begin{align*}
    \text{Kin}&\text{ematics} &\ \ \ \ && \text{Rot}&\text{ation Kinematics}\\
    x &= x_ot+v_ot+\frac{1}{2}at^2 &&& \theta &= \theta_ot\omega_ot+\frac{1}{2}\alpha t^2\\
    v &= v_ot+at &&& \omega &= \omega_ot \alpha t\\
    % \underbrace{v^2 &= v_o^2+2a \Delta x &&& \omega^2 &= \omega_o^2 + 2 \alpha \Delta \theta}_{\text{Variables get replaced as per the table}}\\
    \end{align*}
}
\noindent\hfil\stackunder[-23pt]{\box0}{%
  \stackunder{\hbox to 270pt{\upbracefill}}{\text{\scriptsize This is my caption}}%
  \hspace{30pt}}\hfill

\lipsum[2]
\end{document}

enter image description here

You must log in to answer this question.

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