Thanks,
Louis H. Turcotte
USAE Waterways Experiment Station
in tabular (or longtable and supertabular) it is easiest to load the
array package which allows extra information to be put in the
preamble. So you can specify raggedright `p' column between two c
columns like so
{c >{\raggedright}p{1in} c}
Note that \raggedright redefines \\ so you can not do this in the last
column without care as it means you can not use \\ to end the entry.
Since Christmas 1994 LaTeX has had a command \tabularnewline for just
this eventuality, you can use it (just like \\) to end a table row,
even when \raggedright has redefined \\.
tabular and longtable support \tabularnewline, I am not sure about
supertabular. Otherwise you can use my trick that ended up in The
LaTeX Companion as \PreserveBackslash defined as
\def\PreserveBackslash#1{\let\temp\\#1\let\\#1}
Then you can go >{\PreserveBackslash\raggedright}p{3in}
and get a raggedright in which \\ still ends the entry.
David
> Another possibility should be making a group for \raggedright, namely
> writing
> {\raggedright .....}\\
Grumble moan complain sigh. This doesn't work. Either you do not put a
\par at the end of that group, in which case the paragraph is not set
raggedright, or you do put a \par at the end of the group, in which
case the strut that LaTeX adds to get the right depth to the last row
gets added to a paragraph on its own, and so you get extra vertical
white space at the end of the entry.
In one of the early test releases of 2e I changed the final strut code
so the strut was not added if you were already in vertical mode, this
solved the extra vertical space problem above, but meant that if an
entry was completely empty, then no paragraph was set at all, and so
the underlying \vbox had zero width. This messed up the placement of
vertical rules in the column. It would have been possible to fix
this, but only by completely changing the way the p{...} size setting
worked, and probably breaking all tabular related packages at the same
time, so we backed the change out. ltboxes.dtx says:
% \begin{macro}{\@finalstrut}
% This macro adds a special strut the \emph{depth} of the box given as
% |#1|, and height and width 0pt. It is used for ensuring that the
% last line of a paragraph has the correct depth in `p' columns of
% tables and in footnotes. In vertical mode nothing is done, as adding
% the strut (as done in 2.09) would start a new paragraph. It would be
% possible to inspect |\prevdepth| to check the depth of the
% just-completed paragraph, but we do not do that here.
% \changes{v1.0g}{1994/05/12}
% {macro added}
% Actually we do even less now, skip the vmode test as it broke tabular
% `p' columns.
% \changes{v1.0p}{1994/11/09}
% {Revert \cs{finalstrut} to 2.09 equivalent (from ltpatch)}.
% \changes{v1.0x}{1995/10/31}
% {Add \cs{nobreak} in horiz mode to allow hyphenation.
% internal/1931}
%
% The |\nobreak| was added (1995/10/31) to allow hyphenation of the
% final word of the paragraph.
% \begin{macrocode}
\def\@finalstrut#1{%
\unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}
% \end{macrocode}
% \end{macro}
%