Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
1  
Please edit your question to make the code fragment a complete document that can be run locally and shows all packages used. –  David Carlisle Sep 27 '12 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? –  Alfred M. Sep 27 '12 at 8:50

1 Answer 1

up vote 8 down vote accepted

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}

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.