0

I'm trying to digitize my professor's lecture notes.

scanned-version

How do I add the arrows and the annotations to the equation? I know this can be done using TikZ, but I just started picking it up... so I have no idea how to do it yet.

Here are the different parts to assemble.

begin{align*}
    L &= T - V \\
    &= \frac{1}{2} m \sum_{n=1}^N \dot{q}_n^2 - \frac{1}{2} \kappa \sum_{n=1}^N (q_{n+1} - q_n)^2
\end{align*}
\begin{equation*}
    \dot{x}_n (t) = \dot{q}_n (t)
\end{equation*}
It's only the difference in the displacements of the masses from their equilibrium position that contributes to the potential energy
\begin{align*}
    \big( x_{n+1} (t) - x_n (t) \big) - \epsilon &= ( n + 1 ) \epsilon + q_{n+1} (t) - n \epsilon - q_n (t) - \epsilon \\
    &= q_{n+1} (t) - q_n (t)
\end{align*}

wyphan
  • 173
  • 2
    This is pretty much what the tikzmark package was originally designed for. There are plenty of examples here, and in the documentation. – Andrew Stacey Sep 14 '20 at 20:10

1 Answers1

3

Thanks to @Andrew Stacey for the suggestion! I got it working using instructions from this page and this page. (Note that I have also replaced the \epsilon's with a for simplicity)

{%
\begin{textblock*}{2in}(0.88in,1.25in)%
\begin{minipage}[h!]{2in}
    \begin{equation*}
        \tikzmarknode{xdot}{\boxed{\dot{x}_n (t) = \dot{q}_n (t)}}
    \end{equation*}
\end{minipage}%
\end{textblock*}%
}

{% \begin{textblock}{3in}(2.7in,1.1in)% \begin{minipage}[h!]{3in} \noindent It's only the difference in the displacements of the masses from their equilibrium position that contributes to the potential energy \begin{align} \big( x_{n+1} (t) - x_n (t) \big) - a &= ( n + 1 ) \epsilon + q_{n+1} (t) \ &\quad - n a - q_n (t) - a \ &= q_{n+1} (t) - q_n (t) \end{align} \end{minipage}% \end{textblock}% }

\noindent The Lagrangian of this system is \begin{align} L &= T - V \ &= \frac{1}{2} m \sum_{n=1}^N \tikzmarknode{qdot}{\dot{q}n^2} - \frac{1}{2} \kappa \sum{n=1}^N \underbrace{ {(q_{n+1} - q_n)}^2 } \end{align}

\begin{tikzpicture}[overlay, remember picture] \draw[overlay,->] (xdot) -- (qdot.south); \end{tikzpicture}

pdflatex-output

wyphan
  • 173