I am having difficulty getting \tikzmark to do its magic. I tried using the tikz library for \tikzmark as in the following code:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc,tikzmark}
\begin{document}
By taking logarithms of both sides
\[
t = \frac{30\cdot\ln(3/22)}{\ln(15/22)}
\tikzmark{calculator}\approx
156
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[arrows=->] (calculator) ++(0,2ex) -- (calculator);
\end{tikzpicture}
\end{document}
But I get a complaint as follows:
! Package pgf Error: No shape named calculator is known.
See the pgf package documentation for explanation.
Type H <return> for immediate help.
...
l.14 \draw[arrows=->] (calculator)
++(0,2ex) -- (calculator);
I tried a different approach where I didn't bother to load the tikzmark library:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc}%,tikzmark}
\newcommand\tikzmark[1]{\tikz[overlay,remember picture] \node (#1) {};}
\begin{document}
By taking logarithms of both sides
\[
t = \frac{30\cdot\ln(3/22)}{\ln(15/22)}
\tikzmark{calculator}\approx
156
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[arrows=->] (calculator) ++(0,2ex) -- (calculator);
\end{tikzpicture}
\end{document}
and I get the totally cryptic error:
! Undefined control sequence.
l.2 \savepointas
{calculator}{pgfid1}
?
I thought I understood overlays and whatnot, but clearly I don't.
What I would like to do here is something like the following kludge:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc}%,tikzmark}
\newcommand\tikzmark[1]{\tikz[overlay,remember picture] \node (#1) {};}
\begin{document}
By taking logarithms of both sides
\[
t = \frac{30\cdot\ln(3/22)}{\ln(15/22)}
\raisebox{-\height}{$\stackrel{\approx}{\stackrel{\uparrow}{\makebox[0pt]{use calculator}}}$}
156
\]
\end{document}




\approx? – A.Ellett Oct 25 '14 at 21:20\draw[arrows=->] (pic cs:calculator) ++ (0,-4ex) -- (pic cs:calculator.south);. But,.southgets placed completely incorrectly. – A.Ellett Oct 25 '14 at 21:22.southbecause pics do not have anchors in the same way that nodes do. (Unless thetikzmarklibrary does the work to emulate them?) – cfr Oct 25 '14 at 21:29.southoperation, take into account that using\tikzmarkdoesn't really produce a node, so those modifiers won't work. – Gonzalo Medina Oct 25 '14 at 21:35\elseso the drawing is made after the first run and the closing\fi). – Gonzalo Medina Oct 26 '14 at 16:13