[XeTeX] longtable without initial par

Andy Black andy_black at sil.org
Thu Apr 16 19:56:17 CEST 2009


Hello,

I have an application where a (potentially long) table sometimes needs 
to appear immediately after an example number and the first row (or 
caption) of that table needs to be on the same line with the example 
number.  (Example numbers have the form of "(2)", "(15)" or "(145)" and 
may be indented.)  There are other times where a (potentially long) 
table needs to appear in an environment all by itself (like one would 
normally expect).

I've tried using the longtable package, but I notice that in the 
\longtable macro definition, the first thing it does is to issue a 
\par.  I'd like to experiment and see what the results look like if I 
make my own command based on longtable that does not have this initial 
\par.  Unfortunately, I'm new enough to TeX that my attempt at creating 
a \newcommand did not work.  I tried this:

\newcommand{\mylongtable}{%
  \par
  \ifx\multicols\@undefined
  \else
     \ifnum\col at number>\@ne
       \@twocolumntrue
     \fi
  \fi
  \if at twocolumn
    \LT at err{longtable not in 1-column mode}\@ehc
  \fi
  \begingroup
  \@ifnextchar[\LT at array{\LT at array[x]}}

but XeLaTeX gives:

! Undefined control sequence.
\mylongtable ...ols \@undefined \else \ifnum \col
                                                  @number>\@ne 
\@twocolumntr...
l.695 }}

?

Is there a way to do what I want and create a new command that is just 
like longtable except for the initial \par?

(I'd like to know the answer to this even if the real solution to my 
problem is to do something like embed the example number in the 
longtable itself.)

Thanks,

--Andy



More information about the XeTeX mailing list