I want to print a long table with pgfplotstable and long tabu. For some reason, with the following code, I do not get the header repeated on every page. I also want a \bottomrule and a caption on every page like "table xy (continued)".
Also, the width I specified by \begin{tabu} to 0.6\linewidth is ignored.
\documentclass{scrreprt}
\usepackage{array}
\usepackage{tabu}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepackage{siunitx}
\usepackage{caption}
\begin{document}
\pgfplotstableset{
create on use/new/.style = {create col/expr={\pgfplotstablerow+1}}} % Indices of rows
\pgfplotstabletypeset[
outfile=table.tex,
begin table={\begin{longtabu} to 0.6\linewidth},
end table={\end{longtabu}},
every head row/.style={
before row={
\toprule
},
after row={
% Specify units in header
& unit & unit & unit & unit & unit & unit \\
\midrule},
},
every last row/.style={
after row={
\bottomrule
\caption[short]{long}\\
\label{tab:table}\\
}
},
multicolumn names,
col sep=space,
columns={
new,
[index]0,
[index]1,
[index]2,
[index]3,
[index]4,
[index]5
},
% Index
display columns/0/.style={
column name=Index,
column type={r},
precision=1
},
display columns/1/.style={
column name=$x_1$,
column type={S},string type},
display columns/2/.style={
column name=$x_2$,
column type={S},string type},
display columns/3/.style={
column name=$x_3$,
column type={S},string type},
display columns/4/.style={
column name=$x_4$,
column type={S},string type},
display columns/5/.style={
column name=$x_5$,
column type={S},string type},
display columns/6/.style={
column name=$x_5$,
column type={S},string type}
]{DATA.txt}
\end{document}
Remark: My data file DATA.txt is loaded correctly and contains some lines like
1 2 3 4 5 6

