Graphics, Figures & TablesLongtable hide column

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

Longtable hide column

Post by fhrttn »

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

Code: Select all

\begin{scriptsize}
\begin{longtable}[c]{llrrHrrrrrcc}
\caption{C-caption}\label{tab:a}\\
% header and footer information

\hline
N&  Q $& Ex & T & D\&K & R & H& S& B& DM1& DM2\\
\hline
\endhead
\hline
\endfoot

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Ijon Tichy
Posts: 640
Joined: Mon Dec 24, 2018 10:12 am

Longtable hide column

Post by Ijon Tichy »

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 Infominimal working example example, that also give us information about the definition of the (usually unknown) column type H?
Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. :cry:
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Longtable hide column

Post by rais »

I guess that's just it---an H column is not specified.
If I had to create one, I'd do s.th. like

Code: Select all

\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: 20
Joined: Thu Nov 16, 2017 2:43 pm

Longtable hide column

Post by fhrttn »

Hiding column with H is worked. I will read the manual of longtable for the second question.
rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Longtable hide column

Post by rais »

Come to think of it,

Code: Select all

\newcolumntype{H}{>{\iffalse}c<{\fi}@{}}
would be even easier.

KR
Rainer
Post Reply