用TikZ註釋align*方程

用TikZ註釋align*方程

我正在嘗試將教授的講義數位化。

掃描版

如何在方程式中加入箭頭和註解?我知道這可以使用 TikZ 來完成,但我剛開始拿起它......所以我還不知道該怎麼做。

以下是要組裝的不同零件。

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*}

答案1

謝謝@安德魯史黛西尋求建議!我按照以下說明讓它工作這一頁這一頁。 (請注意,為了簡單起見,我還用 替換\epsilona

{%
\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-輸出

相關內容