Published 2009-05-11 | Author: Alain Matthes

Demonstration of the tkz-linknodes package, a package that makes it easy to link elements in an amsmath align or aligned environment.

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Author: Alain Matthes (http://altermundus.com/)
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{tikz}
\begin{document}

\parindent=0pt

\begin{center}
\fbox{%
\begin{minipage}{10cm}
\begin{NodesList}[margin=2 cm]
\begin{align}
\intertext{\hfil isolate the term with the variable \hfil}
\end{align}
\LinkNodes{$+2$}%
\LinkNodes{$\div 3$}
\LinkNodes{$\sqrt{\ldots}$}
\LinkNodes{$\sqrt{x}=|x|$}
\end{NodesList}
\end{minipage}}
\end{center}

This example is from  MathMode.pdf of Herbert Vo\ss

\begin{NodesList}[margin=1cm]
\begin{displaymath}\displaywidth=.2\linewidth
\begin{aligned}
y &= 2x^2 -3x +5                          \AddNode\\
& \hphantom{= \ 2\left(x^2-\frac{3}{2}\,x\right. }%
\textcolor{blue}{%
\overbrace{\hphantom{+\left(\frac{3}{4}\right)^2- %
\left(\frac{3}{4}\right)^2}}^{=0}}   \\
&= 2\left(\textcolor{red}{%
\underbrace{%
x^2-\frac{3}{2}\,x + \left(\frac{3}{4}\right)^2}%
}%
\underbrace{%
- \left(\frac{3}{4}\right)^2 + \frac{5}{2}}%
y
\end{aligned}
\end{displaymath}
{%
\tikzset{LabelStyle/.append style = {left,text=red}}
\begin{minipage}{5cm}
$2x^2 -3x$ is the beginning of an algebraic identity %
(binomial formula)
\end{minipage}}
\LinkNodes{$(a-b)^2=a^2-2ab+b^2$}
}
\end{NodesList}

\end{document}


• #1 Thiago de Melo, May 15, 2009 at 10:03 p.m.

Nice! There is a mistake on label passing from (5) to (6). It is \sqrt{x^2}=|x|. Regards.