[texhax] Setting all \raggedright paragraphs in a longtable

Peter Davis pfd at pfdstudio.com
Wed Jul 13 22:12:58 CEST 2011


2011/7/13 Herbert Voss <Herbert.Voss at fu-berlin.de>

> Am 12.07.2011 23:43, schrieb Peter Davis:
>
>  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:
>>
>
> \documentclass{article}
> \usepackage{array,longtable,**ragged2e}
> \pagestyle{empty}
>
> \newcommand\colhead[1]{\**sffamily\bfseries #1}
> \newcommand\TR[4]{\RaggedRight #1 & \RaggedRight #2 &
>                  \RaggedRight #3 & \RaggedRight #4\\ \hline}
> \newcolumntype{P}[1]{>{\**RaggedRight}p{#1}}
> \begin{document}
>
>
> \begin{longtable}{|p{1.5in}|p{**1in}|p{1.75in}|p{1.75in}|}\**hline
> \TR{\colhead{TaskName}}{\**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}
>
> \begin{longtable}{|P{1.5in}|P{**1in}|P{1.75in}|P{1.75in}|}\**hline
> \colhead{TaskName} & \colhead{DRI} & \colhead{Description} &
> \colhead{Risks}\\\hline
> Add to build     & Developer One & n/a & n/a \\\hline
> Asset management & Developer Two & n/a & n/a \\\hline
> \end{longtable}
> \end{document}
>
>
Excellent!  Thank you very much.

-pd


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


More information about the texhax mailing list