tikzmark

\documentclass{article}
\usepackage{amsmath,tikz}
\usetikzlibrary{tikzmark,quotes}
\begin{document}
\begin{align}
  \delta S[q] &= S[q+\varepsilon] - S[q] \notag \\
              &= \int_{t_1}^{t_2} \tikzmarknode{1}{dt}
                 \left\{ L(q+\varepsilon,\dot{q}
                 +\dot{\varepsilon},t) - L(q,\dot{q},t)
                 \right\} \notag \\[11ex]
              &= \int_{t_1}^{t_2} \tikzmarknode{2}{dt}
                 \left\{ L + \varepsilon
                 \frac{\partial L}{\partial q} + \dot{\varepsilon}
                 \frac{\partial L}{\partial \dot{q}}
                 + O(\varepsilon^2,\dot{\varepsilon}^2) - L \right\}
\end{align}
\begin{tikzpicture}[overlay, remember picture]
  \draw[-stealth, shorten >=1ex, shorten <=1ex]
    (1.south) to ["$
    \begin{aligned}
    \varepsilon &> 0 \\
            t_1 &\not= t_2
    \end{aligned}
    $"] (2.north); 
\end{tikzpicture}
\end{document}​

Leave a Reply

Your email address will not be published. Required fields are marked *