TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to draw an arrow to a table like in this picture.


share|improve this question
up vote 5 down vote accepted

And as a LaTeX document.



    & x             \\\cline{2-2}
    & c             \\\cline{2-2}
    & control link  \\\cline{2-2}
  \noalign{\smash{\llap{\lower2pt\hbox{\tt fp$\longrightarrow$}}}}
    & return address\\\cline{2-2}
    & a[9]          \\\cline{2-2}

share|improve this answer

For the task of drawing stack diagrams I once used the Groff PIC processor which can emit TeX. PIC is a diagram language from the Unix Troff tool. For the example below, the PIC code looked like this:

box wid 0.9 height (8/25) dotted "incoming"
ptr("$k = 0$" rjust)
box wid 0.9 height (12/25) "spills"
  { "~~completed region" ljust at last box .e }
box wid 0.9 height (4/25) 
box wid 0.9 height (4/25) "\tt a" 
  { "~~newly allocated slot in" ljust \
    "~~region under construction" ljust at last box .e }
ptr("$k = -12$ (cursor)" rjust)
box wid 0.9 height (14/25) dotted "not yet" "allocated" 

enter image description here

Obviously this is not a pure TeX solution but the description language is suffiently high level to mark an interesting point in the design space.

share|improve this answer

Here's a quick mock-up with Plain:

  \offinterlineskip % remove skips so that the \vrule's span the whole lineheight
  \mathsurround=3pt % consistent surrounding hspace for the arrow
    % begin preamble
      \vphantom{$\Big($}#% for every line, insert a invisible Big paren, to
                         % account for the lack of interlineskip
    % end preamble
    &\tt x\cr
    &\tt c\cr
    &control link\cr
    \noalign{\smash{\llap{\lower2pt\hbox{\tt fp$\longrightarrow$}}}}
    % ^ place the fp arrow outside the alignment, \smash'ed (so it doesn't take
    % any vertical space), left over-lapping (\llap), and lowered (so it's on
    % the same level as the horizontal rule.
    &return address\cr
    &\tt a[9]\cr

share|improve this answer

One way to do would be by making a Tikz image as shown here make each cell of a table as node and then you can connect arrows from anywhere in the document as long as your references are correct. How to draw lines around multiple table cells

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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