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

Is there a simple and robust way to achieve what is illustrated by the two black arrows below, i.e., shifting the title in a right-aligned column right by a fixed amount.


Coltitle1 & Coltitle2 \tabularnewline
AB & 5 \tabularnewline
A & 11 \tabularnewline
AC & 10 \tabularnewline

Coltitle1 & LongColtitle2 \tabularnewline
AB & 5 \tabularnewline
A & 11 \tabularnewline
AC & 10 \tabularnewline

I'd like to avoid bad box(es)-warnings. Also, I would prefer (=not absolutely necessary) if the right end of the table would stay where it is, i.e., directly adjacent to the numbers. I.e.,

Coltitl|e2         instead of       Coltitle2|
      5|                                  5  |
     10|                                 10  |
    ...|                                  ...|

where | marks the right end of the table.

share|improve this question
up vote 5 down vote accepted

You can say


However, the table width will not take into account the shift. That may be done with a suitable table preamble such as

share|improve this answer
@Frank: \dimexpr allows you to subtract 2em from the \width. I normally write it as \dimexpr\width-2em\relax. – Martin Scharrer Mar 26 '11 at 22:56

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.