I'm using pgfplotstable to display data from .csv files and it happens that displayed tables break over three pages. The problem is, that for every page an entry is placed into the list of tables. Here the way I currently use pgfplotstable:
\documentclass{article}
% MWE from http://tex.stackexchange.com/questions/40411/import-files-with-pgfplotstable-and-split-tables-across-multiple-pages
\usepackage{pgfplotstable}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{array}
\usepackage{filecontents}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\usepackage{filecontents}
\usepackage{longtable}
\begin{document}
\listoftables
\begin{filecontents}{testdata.dat}
Idx Nam Dim Grd
1 Ady 53 F
2 Bar 72 C
3 Cor 83 B
4 Dar 58 D
5 Esa 68 C
6 Foo 67 C
7 Gar 74 C
8 Hur 65 D
9 Jaz 85 B
10 Ker 91 A
1 Ady 53 F
2 Bar 72 C
3 Cor 83 B
\end{filecontents}
\pgfplotstableset{
begin table=\begin{longtable},
end table=\end{longtable},
}
\pgfplotstabletypeset[ col sep=space
, header=true
, every head row/.style={ before row=\caption{ The Caption }\\\toprule
, after row=\midrule\endhead }
, every last row/.style={after row=\bottomrule}
] {testdata.dat}
\end{document}
Is there a way keeping repetition of caption and head per page, but only placing one entry in list of tables?
Best regards!
longtable
you want\caption
in the\endfirsthead
and\caption[]
in\endhead
I'm not sure anout the pgfplotstable key names to acjhieve thataddcontentsline{lot}{section}{The Caption}
und using\caption*{}
instead of\caption{}
in\pgfplotstabletypeset[…]
. It reduces the appearance in the list of tables to one, but the number of the table is missing. Any ideas to retrieve the number?