Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like to have a pgfplotstable with the caption below the data, just like with a regular table:

\begin{table}[h]
\centering
\begin{tabular}{lccc}
   A & 3 &  4 & 6 \\
   B & 4 &  5 & 7 \\
\end{tabular}
\caption{Blah}
\end{table}

But how to?

I'm trying it like this:

\pgfplotstabletypeset[
col sep=comma,
string type,
every head row/.style={before row=\hline,after row=\hline},
every last row/.style={after row=\hline },
every last row/.append style={after row={\caption{The caption},
]{data.csv}

But i fail with a runaway argument.

share|improve this question
    
It's rather common to place the caption above a table (also with regular tables!). IMHO you should rethink this layout. –  cgnieder Nov 2 '12 at 11:08
    
Just replace the tabular environment with the \pgfplotstabletypeset one in your first code. –  Luigi Nov 2 '12 at 11:15
    
@cgnieder, I have rules to stick to for this document –  user21668 Nov 2 '12 at 11:24
    
@Luigi this works. Thanks. –  user21668 Nov 2 '12 at 11:25
add comment

closed as too localized by Jake, cgnieder, Heiko Oberdiek, Andrew Swann, Stefan Kottwitz Dec 15 '12 at 15:28

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.