5

I want to point out what the different parts of an equation is by arrows pointing into the equation. By using the \tikzmark command from Adding a large brace next to a body of text I have managed to come up with this:

\documentclass[12pt]{memoir}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}

\begin{document}
{\Large
\begin{equation*}
 V\tikzmark{V} = V\tikzmark{Vp}_p + V\tikzmark{Vt}_t\frac{fu\tikzmark{fu}}{fu_t\tikzmark{fut}}
\end{equation*}
\begin{tikzpicture}[overlay,remember picture]
    \node (Ve) [below of = V, node distance = 3.5 em]{\footnotesize \textsf{Distribution volume}};
    \draw[<-, in=180, out=-90] (V.south) to (Ve.west);

    \node (Vpe) [below of = Vp, node distance = 2.5 em] {\footnotesize \textsf{Volume water in plasma}};
    \draw[<-, in=180, out=-90] (Vp.south) to (Vpe.west);

    \node (Vte) [below of = Vt, node distance = 1.5 em] {\footnotesize \textsf{Volume water in tissue}};
    \draw[<-, in=180, out=-90] (Vt.south) to (Vte.west);

    \node (fue) [right of = fu, node distance = 6 em] {\footnotesize \textsf{Fraction unbound drug in plasma}};
    \draw[<-] (fu.east) to (fue.west);

    \node (fute) [right of = fut, node distance = 6 em] {\footnotesize \textsf{Fraction unbound drug in tissue}};
    \draw[<-] (fut.east) to (fute.west);

\end{tikzpicture}
}
\end{document}

enter image description here

However, the \tikzmark command doesn't really work for me cause I can't use it to point directly to one particular glyph. Furthermore I am having serious trouble making the arrows point to the beginning of the text and at the same time place the text so that it doesn't overlap. Seems like I would want the beginning of the text to be underneath and not the center. What is the tricks that I am missing here?

4

With the help of Highlighting equation with arrow and the anchor=west command, here is one way of doing it:

\documentclass[12pt]{memoir}
\usepackage[cmintegrals,cmbraces]{newtxmath}
\usepackage{ebgaramond-maths}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc}

\newcommand{\tikzmark}[1]{\tikz[baseline,remember picture] \coordinate (#1) {};}

\begin{document}
{\Large
\begin{equation*}
 \tikzmark{V}V = \tikzmark{Vp}V_p + \tikzmark{Vt}V_t\frac{\tikzmark{fu}fu}{\tikzmark{fut}fu_t}
\end{equation*}
\begin{tikzpicture}[overlay,remember picture]
    \node (Ve) [below of = V, node distance = 4 em, anchor=west]{\footnotesize \textsf{Distribution volume}};
    \draw[<-, in=180, out=-90] (V.south)++(.25em,-.5ex) to (Ve.west);

    \node (Vpe) [below of = Vp, node distance = 3 em, anchor=west] {\footnotesize \textsf{Volume water in plasma}};
    \draw[<-, in=180, out=-90] (Vp.south)++(.25em,-.5ex) to (Vpe.west);

    \node (Vte) [below of = Vt, node distance = 2 em, anchor=west] {\footnotesize \textsf{Volume water in tissue}};
    \draw[<-, in=180, out=-90] (Vt.south)++(.25em,-.5ex) to (Vte.west);

    \node (fue) [right of = fu, node distance = 6.5 em] {\footnotesize \textsf{Fraction unbound drug in plasma}};
    \draw[<-] (fu.east)++(1.2em,0.5ex) to (fue.west);

    \node (fute) [right of = fut, node distance = 6.5 em] {\footnotesize \textsf{Fraction unbound drug in tissue}};
    \draw[<-] (fut.east)++(1.2em,0.5ex) to (fute.west);

\end{tikzpicture}
}
\end{document}

enter image description here

  • +1 and I'm glad you've found a solution. I think that I would use a different implementation of the tikzmark macro, though. In particular, you seem to use it to put an empty node near the text; I think that I would use it to put the text in a node. I demonstrated it recently in tex.stackexchange.com/questions/278173/…, if you think it's worth me posting a separate answer, I can take a look later, but the main thing is to get a solution :) – cmhughes Nov 18 '15 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.