In my experiments with pgfplotstable, I've run into some bumps:
- merging multiple columns
- adding formatting commands to text within cells
Problem
I cannot seem to properly add a \multicolumn{}{}{}
to my portable graphics format plot table.
I've viewed the following questions:
- Multiple Multi columns with pgfplotstable
- Pgfplotstable multicolumn table with dec sep align and Tabularx
Example
\documentclass{article}
\usepackage{fontspec}
\usepackage{booktabs}
\usepackage{pgfplotstable}
\usepackage{multicol}% <-- Don't think this is needed.
\pgfplotstableset{% Global config
every head row/.style={before row=\toprule,after row=\midrule},
every last row/.style={after row=\bottomrule},
col sep=&,
row sep=\\,
column type=l,
column type={>{\fontseries{bx}\selectfont\color{orange}}l}, %see sec 2.6 for defining column types
string type,
postproc cell content/.append style={ % see sec 3.2
/pgfplots/table/@cell content/.add={\fontseries{\seriesdefault}\selectfont\color{black}}{}}
}%
\begin{document}
\pgfplotstabletypeset{%
col1 & col2 & col3\\
here & more & stuff\\
for & good & looks \\ % \multicolumn{2}{c}{good looks} % <-- Replacing the cells "good" and look" with this causes problems
}%
\end{document}
Best Answer
I think it is better to give a true minmal working example. There is much stuff, which has nothing to do with the problem...
Maybe, you are looking for something like this: