1

Possible Duplicate:
Fixed width column with text centered/raggedright/raggedleft in tabular?

My longtable has a column with a fixed size, p{2cm}. How do I make that column align to the left? It comes out justified.

Cost
  • 4,517
  • Have a look at http://tex.stackexchange.com/questions/12703/fixed-width-column-with-text-centered-raggedright-raggedleft-in-tabular -- my solution also works for longtable. (You want to replace m with p.) – lockstep Nov 10 '12 at 13:01
  • @lockstep I am sorry I don't get it. Your example refers to a tabular environment. Would that work with a longtable as well? Also, should I add the command in the preamble? – Cost Nov 10 '12 at 15:59
  • a) Yes b) Load the array package and declare the new column type L as I did in the preamble. – lockstep Nov 10 '12 at 17:38
  • 1
    Add \userpackage{array} \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} to your document preamble and use \begin{longtable}{..L{2cm}..} in your document. – Werner Nov 13 '12 at 01:00
  • Seven out of your nine most recent questions have been closed (overall: nine out of twenty -- almost 50%!). Please take a minute to look at what has been criticized about your questions, and try to avoid these flaws in your next questions! – doncherry Nov 13 '12 at 01:37

0 Answers0