Considering this MWE, I am looking to obtain bold style on a row. The highlight's style works on columns but not on row.
\documentclass{standalone}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableset{highlight/.append style={
postproc cell content/.append code={
\pgfkeysalso{@cell content=\textbf{##1}}%
}
}}
\pgfplotstabletypeset[
every first column/.style={highlight,/pgf/number format/sci},
every last row/.style={highlight,/pgf/number format/sci}, %does not work
col sep=&,row sep=\\]{
colA & colB & colC \\
11 & 12 & 13 \\
21 & 22 & 23 \\
}
\end{document}
Do you any idea ? This seems that postproc cell content does not work on rows.
EDIT
Another problem is that the \pgfkeysalso remove the sci formatting....
\documentclass{standalone}
\usepackage{pgfplotstable}
\begin{document}
\pgfplotstableset{hhb/.append style={
postproc cell content/.append code={
\pgfkeysalso{@cell content=\textbf{##1}}%
}
}}
\pgfplotstabletypeset[
every first column/.style={highlight,/pgf/number format/sci},
% every last row/.append style={highlight},
%every first column/.style={sci,postproc cell content/.append style= {/pgfplots/table/@cell content/.add={\bf}{coucou}}},
col sep=&,row sep=\\]{
colA & colB & colC \\
11 & 12 & 13 \\
3E+4 & 22 & 23 \\
}
\end{document}
EDIT 2:
In order to avoid the previous problem, the syntax must be:
\pgfplotstableset{hhc/.style={
postproc cell content/.append style={
/pgfplots/table/@cell content/.add={$\bf}{$},
}
}}
But this works only for the columns and not for rows.
EDIT 3:
Solution to make ith row in bold:
\pgfplotstableset{
highlightrow/.style={
postproc cell content/.append code={
\count0=\pgfplotstablerow
\advance\count0 by1
\ifnum\count0=#1
\pgfkeysalso{@cell content/.add={$\bf}{$}}
%\pgfkeysalso{@cell content=\textbf{##1}}%
\fi
},
},
}
Example of use:
\pgfplotstabletypeset[ highlightrow={2},
col sep=&,row sep=\\]{
colA & colB & colC \\
11 & 12 & 13 \\
3E+4 & 22 & 23 \\
}

{$\bf}{$}to{\bfseries}{}so that I can get use formatting commands within the rows that override the global settings (see http://tex.stackexchange.com/questions/236210/how-can-i-use-variables-or-formatting-commands-in-a-header-row-of-a-pgfplotst/236364?noredirect=1#comment562697_236364). – Jonathan Komar Apr 07 '15 at 06:59