> On Fri, 25 Jan 2002, Jürgen Vigna wrote:

<introduction talking about heacy jobs in tabular snipped>
 
>       - I don't know yet how to get a "justified" text in a cell, if it
> is possible, and if there is one reason to do that !

This this probably easiest to do with plain TeX. For just one line try \hbox to
<width>{<Material>} and be sure to include some flexible glue or leaders so TeX
has an even chance. If you want a paragraph I suggest \hbox{\textwidth=<width>
<material>} but you might want to set a few more paragrpah parameters and add a
\par after the material (I have tested neither right now, so YMMV).

If you want to determine the column width auomagically this involves setting
the table at least twice and will be a lot of work. Think deep plain TeX and
react accordingly. I think CTAN has some packages that solve he problem but
they almost cerainyl feaure very heavy plain TeX.

>       - But if we want to reflect the column set-up on the display, we
> have (I guess) to set the paragraph layout of each cell accordingly to the
> tabular set-up. In this case, (and assuming that the corresponding code is
> not too much tricky ?), the generated Latex file will look ugly, as there
> will be an (unnecessary) alignment command for each cell !

I would propose only "fixing" the alignment with filll glue or whatever when
it is different from the column default. Plain LaTeX use can use a 1 coluimn
\multicolumn with different alignment if they feel the need to say out of plain
TeX.

> 
> >
> > >   \providecommand{\tabularnewline}.
> > > The problem was not to add this command (this is just ignored in
> > > latex), but to add it in the preamble and not just before each table as
> > > I did!
> >
> > Well this is easy to do one has just to introduce a LaTeX feature and
> > set the right bool in the validate call. As you said you can have a look
> > how it is done for the array package.

See the LaTeX companion about this... it shows you how to do lots of paragraphs
in a fixed width cell inside a tabular environment and a whole lot more, 
without
resorting to different commands inside the tabular cell. (This does like a
little plain TeX but is a better solution IMHO).

FYI if you are thinking about doing fancy games with tables it is probably a
good idea to either grab something from CTAN or plunge in the plain TeX
involved. Tables with some of the hairer features might be more cleanly written
using \halign directly (tabular, array, tabbing, etc are all based on \halign).

-- 
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."


Reply via email to