Generaltables, wrapping text inside column

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
darckhart
Posts: 34
Joined: Mon Jul 09, 2007 4:04 am

tables, wrapping text inside column

Post by darckhart »

I am using the p{width} command to set the column widths of my table. However, this command also makes the text inside p justified, which causes unsightly spacing between words. How can I set the width of columns for my table and still keep the text inside the column left-justified (i.e. raggedright)?

ex:

Code: Select all

\begin{tabular}{@{} |p{3cm}|p{3cm}|c|}
Feed flour from hopper to milling pins & Variable (slower) flow rate & 5\\
would result in a disproportionately large space between the words 'feed' and 'flour' just so that it can use up that 3 cm of column width.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tables, wrapping text inside column

Post by localghost »

You can either try the array or the tabularx package. Both give you better control of columns and their contents. The tabulary package could also be helpful.
darckhart
Posts: 34
Joined: Mon Jul 09, 2007 4:04 am

Re: tables, wrapping text inside column

Post by darckhart »

The tabulary package looks useful. I will try that out. Thanks for the recommendations.
Post Reply