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'd like to vertically center the alignment of an image in a table cell. The Text is (like usual) vertically centered, but the images continue to stick to the top of the cell.

\NC  Darstellung \VL Bedeutung \SR
\NC {\externalfigure[buttonform][height=0.8\lineheight]} \VL Mausklick zum Aktivieren (nötige Eingabeaktion) \SR
\NC {\externalfigure[buttontext][frame=on, height=0.8\lineheight]}\VL Bestätigung (zu erwartendes Resultat) \LR

Is there any known way to position the images (which are as high as a text line) at the same vertical position as the Text in the other cells?

share|improve this question
Add location=low to the second argument of \externalfigure. – Aditya May 24 '12 at 17:47

The solution for your case, as Aditya says:

\externalfigure[buttonform][height=0.8\lineheight, location=low]

Note that [location=low] does not center the figure in the table cell, but places it on the bottom of the line of text you are currently on. This only works as centering on the line because the figure is as high as a piece of text; and centering on the line only works as centering in the cell because

  1. All cells in the row contain only one line
  2. The lines of text are vertically centered in the cells.

If you want to center a figure in a table cell in general, though, you should use the TABLE mechanism instead, and pass [align=lohi] to the appropriate row/column/cell. The example below does it in three different ways; any one of these would work.

% set vertical centering (and horizontal justification) for all rows

% set vertical centering for columns 2 and 4 (yes, we have no column 4 yet)

        \bTD \input linden \eTD 
        % set vertical centering for a particular cell
        \bTD[align=lohi] \externalfigure[cow][width=1cm] \eTD
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.