I want to use dec sep align
and conditional formatting at the same time. Separately I managed to make them work, but together they double every value in the column.
\documentclass[]{article}
\usepackage{booktabs,pgfplotstable,colortbl}
\begin{document}
\begin{table}[h!]
\pgfplotstabletypeset[%
columns/A/.style={%
postproc cell content/.style={
/pgfplots/table/@cell content/.initial={}{
\pgfmathparse{int(less(##1,0))}
\ifnum\pgfmathresult=1
\cellcolor{green}{##1}
\else
{##1}
\fi
}
},
dec sep align,
},
% columns/.style={
% dec sep align
% },
col sep=comma
]{ ,A,B,C,D
1,-2.27,-32.94,134.32,-19.92
2,3.40,13.53,106.51,11.79
3,-116.5,-6.43,208.59,-0.11
4,-16.47,-2.38,299.76,-9.76
}
\end{table}
\end{document}
which renders the following result
The commented solution also doesn't work.
Ideally, I would like all columns to respect dec sep align
and columns A, B and D to also respect conditional formatting. So far, I managed to get column A to respect conditional formatting, but only if I don't also use dec sep align
at the same time.
Is it a bug that dec sep align
cannot be used with conditional formatting or I just didn't get it how to use them?