Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Q] splitting a \multicolumn command (tabu vs. ltxtable)

26 views
Skip to first unread message

Didier Verna

unread,
Jul 22, 2011, 12:05:12 PM7/22/11
to

Hello,

with the LTXtable package, I was able to define two commands to open
and close a multicolumn respectively, in this way:

\newcommand\openmc{\multicolumn{3}{p{\linewidth}}\bgroup}
\newcommand\closemc{\egroup\\}

such as I could then write something like this (don't try to make any
sense out of this idea; it's simplified from the original one, just to
exhibit the problem):

\begin{longtable}{llX}
\openmc Multicol body\closemc
\end{longtable}


I'm trying the replace ltxtable with tabu, but this hack no longer
works. Minimal test case below:


\documentclass{article}

\usepackage{longtable}
\usepackage{tabu}

\newcommand\openmc{\multicolumn{3}{p{\linewidth}}\bgroup}
\newcommand\closemc{\egroup\\}


\begin{document}

\begin{longtabu}{llX}
\openmc This doesn't work\closemc
\end{longtabu}

\end{document}


If anyone has an idea, I'd like to hear it.

Thanks!


--
Resistance is futile. You will be jazzimilated.

Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com

Mirko Vukovic

unread,
Jul 22, 2011, 2:18:53 PM7/22/11
to

wrong newsgroup?

try using \tabularnewline instead of \\

Mirko

Didier Verna

unread,
Jul 22, 2011, 3:13:00 PM7/22/11
to
Mirko Vukovic <mirko....@gmail.com> wrote:

> wrong newsgroup?

Ouch! So sorry...

0 new messages