How can we draw an arrow illustrating the rule of three like this:
If we have for example:
f(x_a) = y_a
f(x_b) = y_b
the arrow would start from y_a, go to f(x_b), then f(x_a) to end at y_b
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityHere's a way to achieve that with tikzmark
library. You may find more informations about how to use it if you want to adjust it the way you like. Just search follow tikzmark
tagged posts here.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[
\tikzmarknode{A}{f(x_a)}=\tikzmarknode{B}{y_a}
\]
\vspace{5pt}
\[
\tikzmarknode{C}{f(x_b)}=\tikzmarknode{D}{y_b}
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[cyan,line width=1pt,->] plot [smooth,tension=1] coordinates {(A.south) ([yshift=7pt]D.north) ([yshift=5pt]C.north) (B.south west)};
\end{tikzpicture}
\end{document}
tikzmark
tag, this is what you're looking for.