I am typsetting a simple table with pgfplotstable and attempting to include units in the headers. I've noticed that certain math macros e.g. \circ
or \gamma
(2 random test cases) fail to typeset. When these are included in a subsequent non-header row, there are no issues! The failure mode is a Missing \endcsname inserted.
There is no problem including math in a straight Tabular environment, whether in the header or not. Any thoughts on how to include math in pgfplotstable header row?
MWE: (works)
\documentclass{article}
\usepackage{pgfplotstable}
%set global options for pgfplotstables
\pgfplotstableset{
string type,col sep=&,row sep=\\,
every head row/.style={after row=\hline},
column type={c}
}
\begin{document}
\pgfplotstabletypeset{
header 1 & header 2 & header 3 \\
col1 & NECL (ppm-m-$^{\circ}$ C) & 10\\
col1 & $\frac{\gamma}{1-\gamma}$ & col3 \\
}
\end{document}
MWE: (fails)
\documentclass{article}
\usepackage{pgfplotstable}
%set global options for pgfplotstables
\pgfplotstableset{
string type,col sep=&,row sep=\\,
every head row/.style={after row=\hline},
column type={c}
}
\begin{document}
\pgfplotstabletypeset{
header 1 & header 2 $\gamma$ & header 3 \\
col1 & NECL (ppm-m-$^{\circ}$ C) & 10\\
col1 & $\frac{\gamma}{1-\gamma}$ & col3 \\
}
\end{document}
column name
for TeX output of that column header appearance. Headers are used for naming the columns internally.