Arrow between lines in the align environment
Just for completeness: with tikzmark
, which you are using, there is no problem in completing the code to give
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{align*}
abc &= def + def + def + def \tikzmarknode{a}{}\\
&= ghi + ghi \tikzmarknode{b}{}\\
&= jkl\tikzmarknode{c}{}\\
&= mno + mno\tikzmarknode{d}{}
\end{align*}
\begin{tikzpicture}[remember picture, overlay,font=\footnotesize]
\draw[-latex] ([xshift=2mm]a.east) coordinate (r)
to [out=0,in=0,looseness=2]
node[midway,anchor=west,xshift=3mm] {definition}
(b -| r);
\draw[-latex] (c-|r)
to [out=0,in=0,looseness=2]
node[midway,anchor=west,xshift=3mm] {blablabla}
(d-|r);
\end{tikzpicture}
\end{document}
This can be done using the witharrows
package.
Here is the code:
\documentclass{article}
\usepackage{witharrows}
\begin{document}
\[
\begin{WithArrows}
abc &= def+def+def+def \Arrow[tikz={font={\mdseries}}]{definition} \\
&= hgi+hgi\\
&= jkl\Arrow[tikz={font={\mdseries}}]{blablabla}\\
&=mno+mno
\end{WithArrows}
\]
\end{document}
Note that you may have to compile twice when using witharrows
.
Go to the package documentation at CTAN to see the many options for usage including fonts, arrowheads, curvature, color, etc.