[texhax] variable number of columns in a longtable

Donald Arseneau asnd at triumf.ca
Fri May 9 23:39:21 CEST 2008


Susan Dittmar <SDittmar at eureca.de> writes:

> I would like to use the same document for two output formats, 

General answer http://www.tex.ac.uk/cgi-bin/texfaq2html?keyword=optional


> \if at SHORT\longtable{|l|l|}\else\longtable{|l|l|l|}\fi
> \hline
> \endhead
> \endfoot
> main column
> & \if at SHORT
>     only one additional column
>   \else
>       first  additional column
>     & second additional column
>   \fi
> \\\hline
> \endlongtable

It looks like you are making most of the table optional, so it
would be simpler to have one test selecting between two complete
lontable environments.  

How long are they?  Enough to overflow TeX's memory?



-- 
Donald Arseneau                          asnd at triumf.ca


More information about the texhax mailing list