Graphics, Figures & TablesMerge down cells in a supertabular

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ntd
Posts: 2
Joined: Sat Nov 10, 2012 4:41 pm

Merge down cells in a supertabular

Post by ntd »

Hi all,

maybe the question is a bit too high level, but I'll try anyway.

Is there something to get an automatic "merge down" behavior as shown by the MWE? Leftmost columns have higher priority, so they prevent the merge of columns on their right.

Code: Select all

\documentclass{article}
\usepackage{supertabular}

\begin{document}

\begin{supertabular}{|l|l|l|}\hline
a & a1 & a11 \\ \hline
a & a1 & a12 \\ \hline
a & x  & a12 \\ \hline
a & x  & a13 \\ \hline
b & x  & b11 \\ \hline
\end{supertabular}
%
$\Rightarrow$
%
\begin{supertabular}{|l|l|l|} \hline
a & a1 & a11 \\ \cline{3-3}
  &    & a12 \\ \cline{2-3}
  & x  & a12 \\ \cline{3-3}
  &    & a13 \\ \hline
b & x  & b11 \\ \hline
\end{supertabular}

\end{document}
Preprocessors, snippets, everything else is acceptable.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Merge down cells in a supertabular

Post by cgnieder »

Hi ntd,

Welcome to the LaTeX community!

I'm afraid there is nothing really automatic. I know there are some tools but I haven't used any of them so I can't comment on that, really.

You might be interested in the multirow package, though.

Regards
site moderator & package author
ntd
Posts: 2
Joined: Sat Nov 10, 2012 4:41 pm

Re: Merge down cells in a supertabular

Post by ntd »

Thank you, Clemens: better to ask than duplicate. I always fear suffering from NIH syndrome.

I didn't find what I'm looking for in the links but I'll keep this thread up to date when (and if) I'll come up with a solution.
Post Reply