3

As I did not get any answer, I decided to split the two question so that they appear less daunting. The initial question I am referring to is this one

Here is a table with regular alignment mixed with dec sep align:

\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\begin{document}

  \pgfplotstabletypeset[%
  col sep=&, header=false,
  every head row/.style={before row={\toprule%
\multicolumn{1}{l}{a}  & \multicolumn{1}{l}{b} & \multicolumn{1}{l}{c} &  \multicolumn{2}{l}{ddd ddd ddd}\\
% \multicolumn{2}{l}{Glonk}\\
                                    }, after row={\midrule}
                         },
  every last row/.style={after row=\bottomrule},
  display columns/0/.style={column name={Grandeur}, string type, column type={l}},
  display columns/1/.style={column name={Unite}, string type, column type={l}},
  display columns/2/.style={column name={Reference}, dec sep align={l}},
  display columns/3/.style={column name={Reference}, dec sep align={l}},
  display columns/4/.style={column name={Reference}, dec sep align={l}},
                       ]
  {%
glonk  &     z           &  323.1 & 323.1  & 323.1
plokt  &     y           &  33.12 & 33.12  & 33.12
jlorp  &     x           &  3.123 & 3.123  & 3.123
  }

\end{document}

And here is what it produces: buggy-table 2

Somehow the width of the columns are incorrectly accounted for when using dec sep align. How could I correct this strange behaviour.

2
  • 1
    Please edit your question to make the code fragment a complete document that can be run locally and shows all packages used. Sep 27, 2012 at 8:42
  • You are right. replacing the multicolumn line by \multicolumn{1}{l}{a} & \multicolumn{1}{l}{b} & \multicolumn{2}{l}{c} & \multicolumn{4}{l}{ddd ddd ddd}\\ solved the problem. Maybe you can put this into an answer that I will be glad to accept?
    – M. Toya
    Sep 27, 2012 at 8:50

1 Answer 1

9

It looks from your image as if decimal alignment is implemented using two table columns internally in which case \multicolumn{1}{l}{c} should be \multicolumn{2}{l}{c}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .