How can I use \pgfplotstablename
in this case
\pgfplotstablegetelem{0}{[index]1}\of\TestTable
instead of \TestTable
?
MWE:
\documentclass[border=5pt]{standalone}
\usepackage{pgfplotstable}
\pgfplotstableread[header=false]{
A B
1 2
0 2
1 0
0 2
0 2
1 0
}\TestTable
\begin{document}
\pgfplotstabletypeset[string type,
every head row/.style={output empty row},% no header
% works funny (with speech mark...)
columns/0/.style = {
string replace={0}{\pgfplotstablename\pgfplotsretval},
},
% works not
columns/1/.style = {
string replace={0}{%\pgfplotstablename % \pgfplotsretval
\pgfplotstablegetelem{0}{[index]1}\of\TestTable %<-- use tablename here
\pgfplotsretval
}
},
]{\TestTable}
%Test: \pgfplotstablegetelem{0}{[index]0}\of\TestTable \pgfplotsretval
%\pgfplotstablegetelem{0}{[index]1}\of\TestTable \pgfplotsretval
\end{document}