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

How do I set right alignment in a longtable column with a fixed width?

I have \begin{longtable}{p{3cm}p{8cm}}

and I'd like my first column to be aligned on the right.

share|improve this question
up vote 16 down vote accepted

You can define a new column as


The MWE:

 col1 & col2 \\\midrule
 \lipsum[1] & \lipsum[2]  \\ \bottomrule

enter image description here

PS. The package booktabs is used to get beautiful rules instead of \hline.

share|improve this answer
That works perfectly, thanks a lot! – Costanza Aug 7 '12 at 6:52

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.