[texhax] variable number of columns in a longtable

Susan Dittmar SDittmar at eureca.de
Thu May 8 13:32:06 CEST 2008


I would like to use the same document for two output formats, both
generated with LaTeX. One of the differences is the number of columns in
one longtable.

What I have right now (stripped down of course):


\newif\if at SHORT
% only the short column (does not work):
% two columns instead (seems to work):

\if at SHORT\longtable{|l|l|}\else\longtable{|l|l|l|}\fi
main column
& \if at SHORT
    only one additional column
      first  additional column
    & second additional column

I think I understand why it does not work (it seems OK if you generate the
long version, but its flaw shows itself for the short version).

Any ideas how I could make this work?

Thanks a lot for your help,


More information about the texhax mailing list