Hi,
I have a table which is say ten columns wide. I would like to select most of the columns, but not all, for example I would like to omit the 2nd and 8th columns.
I have tried e.g. p{0mm} in the tabular line, but that didn't work.
Can I do this? It would be very useful. Thanks
(also posted on Ubuntu Forums, but no answer so far and I need an answer today, otherwise I have to start lots of hand-editing.)
Graphics, Figures & Tables ⇒ Skip Columns in Tables
Skip Columns in Tables
Last edited by xadder on Fri Dec 16, 2011 3:13 pm, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10308
- Joined: Mon Mar 10, 2008 9:44 pm
Skip Columns in Tables
Hi Xadder,
welcome to the board!
You could define a column type for hiding the cell content. For example:
Here, the second column of H type is hidden, the @{} removes the column space between this column and the column before, it could also be placed after it.
Stefan
welcome to the board!
You could define a column type for hiding the cell content. For example:
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{array}\newcolumntype{H}{@{}>{\lrbox0}l<{\endlrbox}}\begin{document}\begin{tabular}{lHl}text & hidden & text \\more text & also hidden & more text\end{tabular}\end{document}
Stefan
LaTeX.org admin
Re: Skip Columns in Tables
Perfect! Many thanks. I'll try to link your reply to the Ubuntu forums also.
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Re: Skip Columns in Tables
Joseph Wright