GeneralLeft justified table cell with wrapped text

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
pmar
Posts: 3
Joined: Wed Aug 13, 2008 6:58 am

Left justified table cell with wrapped text

Post by pmar »

Hi all,
I feel like this should be really easy, but after putting several chapters into LaTex I still can't figure this
out. I have a lot of tables that require me to wrap text, so I've been using p{width} for columns
in a longtable environment. This works well, except sometimes when text is wrapped it creates a very underfull row in the cell. Something that looks like this:
_________________________________________________
TABLE TITLE
_________________________________________________

Section
Text 1
Text 2
Really long text 3 that
successfully wraps
Text......4 ...... doesn't .....wrap succ-
essfully
_________________________________________________
I'd like to make this whole column left justified so that rows like 'text 4' do not
add extra spacing between words.

Suggestions?
Thanks ahead of time.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Left justified table cell with wrapped text

Post by Stefan Kottwitz »

Hi pmar,

welcome to the board!
You could use \raggedright inside a cell, or define the column format like

Code: Select all

>{\raggedright\arraybackslash}p{width}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
using the array package.

Stefan
LaTeX.org admin
pmar
Posts: 3
Joined: Wed Aug 13, 2008 6:58 am

Re: Left justified table cell with wrapped text

Post by pmar »

That does it! Thanks a lot.
Post Reply