I'm trying to include data into a tabular environment
\usepackage{booktabs}
\usepackage{siunitx}
\begin{table}
\begin{center}
\begin{tabular}{SSSS}
\toprule
{$na^3$} & {$V_0/T_c^0$} & {$T_c/T_c^0$} & {$\nu$} \\
\midrule
\input{../results/110718/all.tex}
\bottomrule
\end{tabular}
\caption{bla}
\end{center}
\end{table}
On compiling I get the error message Extra }, or forgotten $.
When I insert all.tex manually, it works:
% ...
\midrule
0 & 0 & 0.99959(72) & 0.882(44) \\
% ...
5e-3 & 2 & 1.02710(66) & 0.757(73) \\
5e-3 & 7 & 0.53844(100) & 0.75(10) \\
\bottomrule
% ...
Just copy paste, all.tex already contains the ampersands and backslashes.
When I don't use siunitx, it works, too:
% ...
\begin{tabular}{cccc}
\toprule
{$na^3$} & {$V_0/T_c^0$} & {$T_c/T_c^0$} & {$\nu$} \\
\midrule
\input{../results/110718/all.tex}
\bottomrule
\end{tabular}
% ...
booktabs doesn't seem to cause the issue. It still doesn't work when I remove the booktabs rules.
The file all.tex is generated automatically. Thus, including it manually is not really an option. And because of the nice formatting capabilities of siunitx I would really like to use it.
I'm using TeX-Live 2011-05-26.
What causes this error and how can I solve this problem?
pgfplotstableif you are willing to slightly modify the way all.tex is generated. – Mikael Öhman Jul 19 '11 at 1:01