1

I've seen ways to make arrows from one part of an equation to another. Is there any way to draw curve lines linking one part of a equation to another part of another equation block, crossing over other equations, and even text?

See the hand drawing for illustration. I believe I've seen this type of figures in text books. But I'm sure they might have otherpowerful typesetting software.

enter image description here EDIT :

I tested the excellent suggestion of David Carlisle in the following code snippet. The line doesn't seem to show up. And yes I compile it twice. The result is shown below.

\documentclass[letterpaper,11pt]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}

\begin{document}

\begin{align*}
&\partial_i \sum_j (A_2)_{jl} \left( \sum \cdots + \sum_u U_{ju} \left( \sum_{\mu} (A_1)_{u\mu} x_{\mu} +  \cdots \right)^2\right)^2 \\
&=\sum_j (A_2)_{jl} \; 2 \; \left( \qquad \cdots \;\; \cdots \qquad \right)_j \; \underbrace{\partial_i \left( \qquad \cdots \;\; \cdots \qquad \right)}_{\tikzmark{a}}
\end{align*}

\begin{align*}
&\overbrace{\partial_i \left( \sum_k (A_1)_{jk} x_k^{\prime} + \sum_u U_{ju} \left( \sum_{\mu} (A_1)_{u\mu} x_{\mu} + \textbf{const} \right)^2\right)}^{\tikzmark{b}}  \\
&= 0 \; + \; \sum_u U_{ju} \partial_i \left( \cdots \;\; \cdots \right)_u^2 \\
&= \sum_u U_{ju} 2 \; \left( \cdots \;\; \cdots \right)_u \; \partial_i \left( \cdots \;\; \cdots \right)_u2 \\
\end{align*}

\end{document}

enter image description here

0

1 Answer 1

3

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}

aaa
\begin{equation}
  a=\underbrace{xyz}_{?\tikzmark{a}}
\end{equation}

a\\
aaa\\
aaaaaa\\
aaaaaaaa
\begin{equation}
  a+\frac{1}{b+\frac{2}{c+\frac{3}{d+4}}}
\end{equation}
a\\
aaa\\
aaaaaa\\
aaaaaaaa
\begin{equation}
    a=\overbrace{xyz}^{?\tikzmark{b}}
\end{equation}

\tikz[remember picture]
\draw[overlay] (pic cs:a)to  [bend left]  (pic cs:b);


\end{document}
3
  • That's really cool ! Is it possible to control where the line goes, e.g. branch left to avoid crossing over some text, like in my figure.
    – horaceT
    Jan 5, 2017 at 0:01
  • For some reason, the arrow doesn't show up. Is there anything to watch out for? I could post the code and the image of the page.
    – horaceT
    Jan 5, 2017 at 4:07
  • 1
    @horaceT you need to run latex twice for tikzmark based things Jan 5, 2017 at 7:39

You must log in to answer this question.

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