我想突出显示 pgfplotstable 中的单元格,但粗体字体设置会覆盖我的数字格式。如何防止这种情况?
以下是 MWE:
\documentclass[12pt]{standalone}
\usepackage{filecontents}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\begin{document}
\begin{filecontents}{data.csv}
0.563725,0.819520,0.713402
0.563725,0.819520,0.713402
\end{filecontents}
\pgfplotstabletypeset[
col sep=comma,
every row 1 column 1/.style={
postproc cell content/.style={
@cell content=\textbf{##1}
}
},
fixed,fixed zerofill,
precision=1,
multiply with=100,
]{data.csv}
\end{document}
输出为:
答案1
你可以 @cell content=\textbf{##1}
用@cell content/.add={$\bf}{$}
代码
\documentclass[12pt]{standalone}
\usepackage{xcolor}
\usepackage{filecontents}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\begin{document}
\begin{filecontents}{data.csv}
0.563725,0.819520,0.713402
0.563725,0.819520,0.713402
\end{filecontents}
\pgfplotstabletypeset[
col sep=comma,
every row 1 column 1/.style={
postproc cell content/.style={
@cell content/.add={$\bf}{$}
}
},
fixed,fixed zerofill,
precision=1,
multiply with=100,
]{data.csv}
\end{document}
结果