Detect and handle empty column names
Brought to you by:
cfeuersaenger,
ludewich
PGFPlotstable can't deal with empty column names. The following example fails with the error message "! Package pgfkeys Error: I do not know the key '/pgf/number format/columns//.try/.try'":
\documentclass{article}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstabletypeset[col sep=comma]{
A,,C,,E
1,2,3,4,5
6,7,8,9,10
}
\end{document}
I've modfied the \pgfplotstableread@impl@collectcolnames@NEXT function found in pgfplotstableshared.code.tex to detect empty column names and replace them with the string "empty", which fixes the error and allows for the column to be accessed with the usual methods.
Patch for PGFPlotstable to handle empty column names
Fixed. Thanks for the report and the excellent pre-analysis.
Now, pgfplots issues a warning (which can be turned off) and assigns the column index to such a column.