[texhax] Setting all \raggedright paragraphs in a longtable

Peter Davis pfd at pfdstudio.com
Tue Jul 12 23:43:59 CEST 2011


I'm trying to setup a long table with 4 columns, each of which may contain
multiline paragraphs.  I want the paragraphs to be set \raggedright, since
they're so narrow.  I'm trying:

\newcommand{\colhead}[1]{{\sffamily\bfseries #1}}
\newcommand{\TR}[4]{{\raggedright #1} & {\raggedright #2} & {\raggedright
#3} & {\raggedright #4} \\ \hline}

followed by

\begin{longtable}{|p{1.5in}|p{1in}|p{1.75in}|p{1.75in}|}%
\hline

\TR{\colhead{Task
Name}}{\colhead{DRI}}{\colhead{Description}}{\colhead{Risks}}

\TR{Add to build}{Developer One}{n/a}{n/a}

\TR{Asset management}{Developer Two}{n/a}{n/a}

...

\end{longtable}

However, I'm *not* getting raggedright.

Any clues?  I also tried defining \TR without the braces around
"\raggedright #1", etc., but just got a bunch of errors.

Thanks,
-pd


-- 
----
The Tech Curmudgeon
http://www.techcurmudgeon.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110712/509d3692/attachment.html>


More information about the texhax mailing list