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 want to align a picture in a cell of a table. Following works as I want for the text in the top left cell and the picture is already vertically aligned, but not horizontally:

  \centering{a} & b & \includegraphics[draft]{test}\\ \midrule
  d             & e & f\\

However placing \includegraphics{test} into a \centering{} results in following error message:

! Misplaced \noalign.
\midrule ->\noalign 
                {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.338 ...test}}\\ \midrule
! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate 

l.339   d &
            e & f\\
share|improve this question
up vote 4 down vote accepted

\centering does not take an argument, making \centering{a} be no different from \centering a. Also, \centering used in your instance has no effect within a tabular. Horizontal \centering is obtained using


Alternatively, if you want the entire column to use \centering, you can use


as the column type (the above support is also provided by array).

share|improve this answer
Thank you. I've just found a tex-faq discussing the problem of “misplaced \noalign” complaints when using \centering, \raggedright, \raggedleft in a table. – Hotschke Apr 12 '12 at 8:41

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.