# Arrow in table from line to line with text

I have the following table:

\begin{tabular}{|p{0.4\textwidth}|p{0.4\textwidth}|}
\hline
95\celsius & 3 min \\ \hline
98\celsius & 10 sec \\ \hline
55\celsius & 10 sec \\ \hline
72\celsius & 1 min \\ \hline
72\celsius & 10 min \\ \hline
8\celsius & hold \\ \hline
\end{tabular}

How can I draw an arrow from one line to another with some text on it? (Similar to how it can be done in a gmatrix from the gauss package.)

The arrow should look somewhat like this:

This seems to be something that can be done with the tikzmark library. Notice that your LaTeX code does not really produce the table shown on the screen shot, so I had to improvise a bit.

\documentclass{article}
\usepackage{siunitx}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{tabular}{|p{0.4\textwidth}|p{0.4\textwidth}|}
\hline
\si{95\celsius} & 3 min \\ \hline
\si{98\celsius} & 10 sec\hfill\tikzmark{A} \\ \hline
\si{55\celsius} & 10 sec \\ \hline
\si{72\celsius} & 1 min\hfill\tikzmark{B} \\ \hline
\si{72\celsius} & 10 min \\ \hline
\si{8\celsius} & hold \\ \hline
\end{tabular}
\begin{tikzpicture}[overlay,remember picture]
\draw[thick,-latex] ([yshift=3pt]pic cs:B) -| ([xshift=1cm,yshift=3pt]pic cs:A)
node[pos=0.75,right] {30 mal} --([yshift=3pt]pic cs:A);
\end{tikzpicture}
\end{document}

• Thanks a lot, works great. Do You have an idea how I could move the arrow just a tad more to the side, so that it is fully outside of the table? – dYTe Sep 18 '18 at 15:30
• @dYTe Yes, sure, just add some xshift to the points, e.g. \draw[thick,-latex] ([xshift=2mm,yshift=3pt]pic cs:B) -| ([xshift=1cm,yshift=3pt]pic cs:A) node[pos=0.75,right] {30 mal} --([xshift=2mm,yshift=3pt]pic cs:A);. – user121799 Sep 18 '18 at 15:40