TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’d like a tabular header to appear on each page of the pdf I’m including. So I am using these commands in pdfpages.

A & B & C

\includepdf[pages={-},angle=90, offset=15mm 0mm, width=5in,height=8.3in, pagecommand={TEST \\ \plotheader}, addtolist={ 1, figure, title, tab:mytable}]{plot.pdf}`

What ends up happening is that the tabular plot header consumes more than one table number, even though it is a figure. As a result, there is a discontinuity in the list of tables in the TOC. How can I avoid this?

share|improve this question
The addtolist option has precisely this effect, that's what it was created for. If you delete it, it should be ok. – Count Zero May 30 '12 at 10:32
Don't use longtable but a simple tabular instead. – Ulrike Fischer May 30 '12 at 12:26
@Ariel: tabular does support p{<len>} columns. – Werner May 31 '12 at 5:00
@Ariel: I don't see anything wrong. Your \includepdf produces a single LoF entry for the first page. If you want an evenly distributed column setup for you table across the entire \textwidth, use the tabularx package with its X column type. – Werner May 31 '12 at 5:20
@Werner: The problem of Ariel was not the (number of) entries in the list of figures (or list of tables) and has nothing to do with the \includepdf options. The problem was the table counter itself: He uses a longtable in the header and each of this longtable increases the table counter and so there are suddenly gaps in the numbering of his normal tables. – Ulrike Fischer May 31 '12 at 6:48
up vote 3 down vote accepted

Don't use longtable in the header. It doesn't make sense there as you don't need a page break and it disturbs the numbering of your normal tables as it increase the table counter internally. Use a simple tabular instead.

share|improve this answer
Thanks for your answer. Combined with @Werner's helpful comment above, I replaced the longtable in the header with tabularx: \def\plotheader{\newcolumntype{Y}{>{\centering\arraybackslash}X} \begin{tabularx}{8.3in}{YYY} A & B & C \end{tabularx}} The counter in the list of tables is now displaying correctly. – Ariel May 31 '12 at 12:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.