I have the following table:

    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

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: arrow

Thanks in advance!


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.

    \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
\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);

enter image description here

  • 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

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.