I use pgfplotstable to generate tables to be included in online submission to journals.
I would like to make my paper independant of pgfplotsable because compilation of the document is made online with an obsolete LaTeX distribution and clumsy packages handling.
I already asked a question to that effect (see this question) but I am now facing a more complicated case.
With this, I learned about the outfile= option of the \pgfplotstabletypeset command which write the tables into a file.
I am using some features of pgfplotstable to replace the number in the table by symbols (inspired by this question).
Here is an eample similar to my actual code:
\documentclass{article}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableset{symbol column/.style={column type=c,
postproc cell content/.style={
/pgfplots/table/@cell content={}{%
\pgfmathparse{int(less(##1, 0.01))}
\ifnum\pgfmathresult=1
*
\else
\pgfmathparse{int(less(##1, .1))}
\ifnum\pgfmathresult=1
**
\else
\pgfmathparse{int(less(##1,1))}
\ifnum\pgfmathresult=1
***
\else
{ }
\fi
\fi
\fi
},
},
}}
\pgfplotstabletypeset[outfile=output_table.tex,
columns/A/.style={symbol column},
columns/B/.style={symbol column},
]
{%
A B
.001 5
.1 .5
.2 .005
1.7 22
}
\end{document}
The output file looks like this:
\begin {tabular}{cc}%
A&B\\%
{}{\pgfmathparse {int(less(.001, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.001, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.001,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(5, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(5, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(5,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%
{}{\pgfmathparse {int(less(.1, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.1, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.1,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(.5, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.5, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.5,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%
{}{\pgfmathparse {int(less(.2, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.2, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.2,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(.005, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.005, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.005,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%
{}{\pgfmathparse {int(less(1.7, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(1.7, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(1.7,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(22, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(22, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(22,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%
\end {tabular}%
which depends upon pgf for the \pgfmathparse and associated commands.
Is there a way to circumvent this without manually editing the table or using external program
\pgfkeysletto copy the content of that macro into the output table (as in the other question). – Christian Feuersänger Dec 02 '13 at 19:46