## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Longtable hide column

Information and discussion about graphics, figures & tables in LaTeX documents.
fhrttn
Posts: 18
Joined: Thu Nov 16, 2017 2:43 pm

### Longtable hide column

With the longtable package how can hide a column, I used H and it gave me error. Also I want to ask about longtable caption, It appears in all pages that the table exist on. How can I change it e.g "Table 1 Continued" in the pages after the first page. Thanks in advance

Here is the sample
\begin{scriptsize}\begin{longtable}[c]{llrrHrrrrrcc}\caption{C-caption}\label{tab:a}\\% header and footer information \hlineN&  Q \$& Ex & T & D\&K & R & H& S& B& DM1& DM2\\\hline\endhead\hline\endfoot

Ijon Tichy
Posts: 277
Joined: Mon Dec 24, 2018 10:12 am
These are two questions (and it is almost ever better to ask two questions if you have two questions instead of mixing two questions into one).

The answer to the second one is: Read \endfirsthead in the longtable manual.

Question to the first question: Can you show us a minimal working example example, that also give us information about the definition of the (usually unknown) column type H?

rais
Posts: 268
Joined: Sun Nov 16, 2014 8:51 pm
I guess that's just it---an H column is not specified.
If I had to create one, I'd do s.th. like
\documentclass{article}\usepackage{array}\newsavebox\dummy\newcolumntype{H}{>{\begin{lrbox}{\dummy}}c<{\end{lrbox}}@{}}\begin{document}\raggedright\begin{tabular}{rl}one & two\\three & four\\\end{tabular} \begin{tabular}{rHl}one & something & two\\three & not visible & four\\\end{tabular}\end{document}

then again, I wouldn't put a column into my table I don't intend to use...

A Happy New Year

Rainer

fhrttn
Posts: 18
Joined: Thu Nov 16, 2017 2:43 pm
Hiding column with H is worked. I will read the manual of longtable for the second question.

rais
Posts: 268
Joined: Sun Nov 16, 2014 8:51 pm
Come to think of it,
\newcolumntype{H}{>{\iffalse}c<{\fi}@{}}