I would like to know if it is possible to hide a given table
column from the output without physically removing it from
the *.tex source.
Consider the following toy example:
\begin{table}[htbp]
\centering
\begin{tabular}{ccc}
a1&b1&c1\\
a2&b2&c2\\
\end{tabular}
\end{table}
Is it possible to hide the 2nd column (containing b1 and b2)
from the output (e.g., dvi file)?
If that is the case, is it possible to hide columns if merged columns
or rows (by virtue of using \multicolumn or \multirow) are present
in the table?
I have provided two additional toy examples below.
The first contains merged columns, while the second example
has both merged rows and columns. Say we want to
remove the 2nd (a_{i2}) and 6th (b_{i2}) columns.
Any suggestions would be greatly appreciated.
Sincerely,
Kouros
"Peace, commerce and honest friendship with all nations; entangling
alliances with none." --Thomas Jefferson: 1st Inaugural Address, 1801.
The Declaration of Independence:
http://www.archives.gov/exhibit_hall/charters_of_freedom/declaration/declaratio$
\begin{table}[htbp]
\centering
\begin{tabular}{|l|ccc|ccc|}\hline
&\multicolumn{3}{c}{A}&\multicolumn{3}{|c|}{B}\\ \hline
1&a11&a12&a13&b11&b12&b13\\\hline
2&a21&a22&a23&b21&b22&b23\\\hline
\end{tabular}
\end{table}
\begin{table}[htbp]
\centering
\begin{tabular}{|l|ccc|ccc|}\hline
&\multicolumn{3}{c}{A}&\multicolumn{3}{|c|}{B}\\ \cline{1-7}
\multirow{2}*{1,2}
&a11&a12&a13&b11&b12&b13\\ \cline{2-7}
&a21&a22&a23&b21&b22&b23\\\hline
\multirow{2}*{3,4}
&a31&a32&a33&b31&b32&b33\\\cline{2-7}
&a41&a42&a43&b21&b42&b43\\\hline
\end{tabular}
\end{table}
> Hi.
>
> I would like to know if it is possible to hide a given table
> column from the output without physically removing it from
> the *.tex source.
>
> Consider the following toy example:
>
> \begin{table}[htbp]
> \centering
> \begin{tabular}{ccc}
> a1&b1&c1\\
> a2&b2&c2\\
> \end{tabular}
> \end{table}
>
>
\documentclass{article}
\usepackage{array}
\newcolumntype{L}{@{}>{\iffalse}l<{\fi}}
\begin{document}
\begin{tabular}{cLc}
a1&b1&c1\\
a2&b2&c2\\
\end{tabular}
\end{document}
It doesn't work on the last column, so you need to add a blind column
there:
\begin{tabular}{ccLc}
a1&b1&c1&\\
a2&b2&c2&\\
\end{tabular}
--
Ulrike Fischer
e-mail: zusätzlich meinen Vornamen vor dem @ einfügen.
e-mail: add my first name between the news and the @.