dimanche 30 novembre 2014

How to I use a longtabu inside \newenvironment?


I have the following newenvironment defined using tabularx



\newenvironment{factlist}{%
\newdimen\unbaseline
\unbaseline=\dimexpr-\baselinestretch\baselineskip\relax
\renewcommand\item[2]{%
\textsc{##1} & {\raggedright ##2\smallskip\\}\\[\unbaseline]}
\tabularx{\linewidth}{rX}}
{\endtabularx}


I use it as follows:



\begin{factlist}
\item{A}{aaaa}
\item{B}{bbbb}
...
\item{Z}{zzzz}
\end{factlist}


Trouble is, the "factlist" does not split across pages. I believe this is because tabularx does not fit across pages.


I figured that "longtabu" from the "tabu" package has the same syntax as tabularx. However, I am not able to replace \tabularx and \endtabularx with \begin{longtabu} and \end{longtabu} in newenvironment. It throws a Runaway argument exception.


I am new to Latex. It would be nice if you could help me getting this code to work.


I am open to other methods as well, since all I want to do is BE ABLE TO SPLIT THE "FACTLIST" ACROSS PAGES!





Aucun commentaire:

Enregistrer un commentaire