One possible solution is to use separate columns for the x
, and manipulate spacing using \tabcolsep
. I find the spacing adequate, but the problem is different numbers of figures behind the decimal point:
Example 1 – tabcolsep

\documentclass[11pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{multirow}
\usepackage{array}
\usepackage{tabularx, }
\usepackage[table]{xcolor}
\definecolor{tabelzwart}{cmyk}{.0,.0,.0,1}
\definecolor{tabelgrijs}{cmyk}{.0,.0,.0,.15}
\definecolor{Akzent}{rgb}{0.6627, 0.63529, 0.55294} %akzentfarbe
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcommand\colourpadding[1]{\addlinespace[-1pt]\arrayrulecolor{#1}\midrule[6pt]\arrayrulecolor{black}}
\begin{document}
\centering
\setlength{\tabcolsep}{0.25em}
\begin{tabular}{
L{26mm}
r
c
c
c
l
C{23mm}
C{19mm}
C{19mm}
}
\rowcolor{tabelzwart}
\textcolor{white}{Article \newline code} &
\multicolumn{5}{p{50mm}}{\cellcolor{tabelzwart}\textcolor{white}{Dimension}} &
\textcolor{white}{QA} &
\textcolor{white}{Per bag} &
\textcolor{white}{Per Box} \\
\rowcolor{tabelgrijs} 80100 & 17.5 & x & 19.1 & x & 17.5 & {G} & 10 & 100\\
\rowcolor{white} 80100 & 17.5 & x & 19.1 & x & 17.5 & {G} & 10 & 100\\
\rowcolor{tabelgrijs} 22333 & 11.8 & x & 12.7 & x & 29.3 & {KWW} & 10 & 100\\
\rowcolor{white} 70100 & 326.632 & x & 5.6 & x & 35.9 & {G K} & 190 & 100\\
\rowcolor{tabelgrijs} 70100 & 36.6 & x & 5.6 & x & 35.9 & {G K} & 190 & 100\\
\rowcolor{white} 70100 & 6.6 & x & 53.63 & x & 35.9 & {G / K} & 9 & 10\\
\rowcolor{tabelgrijs} 70100 & 6.6 & x & 53.6 & x & 35.9 & {G} & 190 & 100\\
\rowcolor{white} 70100 & 6.6 & x & 5.6 & x & 35.9 & {G} & 1903 & 100\\
\rowcolor{tabelgrijs} 70100 & 6.6 & x & 53.6 & x & 35.9 & {G} & 190 & 100\\
\end{tabular}
\end{document}
Example 2 – dcolumn and tabcolsep

A better solution is to set the the three columns with decimal point as D
-columns, using the package dcolumn. I have also set the two \times
-columns as D-columns, giving correct mathematical symbol and nice spacing.
I have fine tuned the column spacing using \tabolsep
and reduced the width of the multicolumn
in the heading to 41 mm.
\documentclass[11pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{multirow}
\usepackage{array}
\usepackage{tabularx, dcolumn}
\usepackage[table]{xcolor}
\definecolor{tabelzwart}{cmyk}{.0,.0,.0,1}
\definecolor{tabelgrijs}{cmyk}{.0,.0,.0,.15}
\definecolor{Akzent}{rgb}{0.6627, 0.63529, 0.55294} %akzentfarbe
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
\newcommand\colourpadding[1]{\addlinespace[-1pt]\arrayrulecolor{#1}\midrule[6pt]\arrayrulecolor{black}}
\begin{document}
\centering
\setlength{\tabcolsep}{0.1em}
\begin{tabular}{
L{26mm}
D{.}{.}{3.3}
D{x}{\times}{1}
D{.}{.}{2.2}
D{x}{\times}{1}
D{.}{.}{2.1}
C{23mm}
C{19mm}
C{19mm}
}
\rowcolor{tabelzwart}
\textcolor{white}{Article \newline code} &
\multicolumn{5}{p{41mm}}{\cellcolor{tabelzwart}\textcolor{white}{Dimension}} &
\textcolor{white}{QA} &
\textcolor{white}{Per bag} &
\textcolor{white}{Per Box} \\
\rowcolor{tabelgrijs} 80100 & 17.5 & x & 19.1 & x & 17.5 & {G} & 10 & 100\\
\rowcolor{white} 80100 & 17.5 & x & 19.1 & x & 17.5 & {G} & 10 & 100\\
\rowcolor{tabelgrijs} 22333 & 11.8 & x & 12.7 & x & 29.3 & {KWW} & 10 & 100\\
\rowcolor{white} 70100 & 326.632 & x & 5.6 & x & 35.9 & {G K} & 190 & 100\\
\rowcolor{tabelgrijs} 70100 & 36.6 & x & 5.6 & x & 35.9 & {G K} & 190 & 100\\
\rowcolor{white} 70100 & 6.6 & x & 53.63 & x & 35.9 & {G / K} & 9 & 10\\
\rowcolor{tabelgrijs} 70100 & 6.6 & x & 53.6 & x & 35.9 & {G} & 190 & 100\\
\rowcolor{white} 70100 & 6.6 & x & 5.6 & x & 35.9 & {G} & 1903 & 100\\
\rowcolor{tabelgrijs} 70100 & 6.6 & x & 53.6 &x & 35.9 & {G} & 190 & 100\\
\end{tabular}
\end{document}
Example 3 – tabularx, dcolumns and \tabcolsep
Still not satisfied? Set the two last rows as right aligned X-columns. Better spacing and fewer overfull hboxes
.

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{array}
\usepackage{tabularx, dcolumn}
\usepackage[table, usenames]{xcolor} % use xcolor with option instead of color
\definecolor{tabelzwart}{cmyk}{.0,.0,.0,1}
\definecolor{tabelgrijs}{cmyk}{.0,.0,.0,.15}
\definecolor{Akzent}{rgb}{0.6627, 0.63529, 0.55294} %akzentfarbe
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\newcommand\colourpadding[1]{\addlinespace[-1pt]\arrayrulecolor{#1}\midrule[6pt]\arrayrulecolor{black}}
\begin{document}
\centering
\setlength{\tabcolsep}{0.1em}
\begin{tabularx}{\linewidth}{
L{26mm}
D{.}{.}{3.3}
D{x}{\times}{1}
D{.}{.}{2.2}
D{x}{\times}{1}
D{.}{.}{2.1}
C{23mm}
R
R
}
\rowcolor{tabelzwart}
\textcolor{white}{Article\linebreak code} &
\multicolumn{5}{p{41mm}}{\cellcolor{tabelzwart}\textcolor{white}{~~\linebreak Dimension}} &
\textcolor{white}{~~\linebreak QA} &
\textcolor{white}{Per\linebreak bag} &
\textcolor{white}{Per\linebreak Box} \\
\rowcolor{tabelgrijs} 80100 & 17.5 & x & 19.1 & x & 17.5 & {G} & 10 & 100\\
\rowcolor{white} 80100 & 17.5 & x & 19.1 & x & 17.5 & {G} & 10 & 100\\
\rowcolor{tabelgrijs} 22333 & 11.8 & x & 12.7 & x & 29.3 & {KWW} & 10 & 100\\
\rowcolor{white} 70100 & 326.632 & x & 5.6 & x & 35.9 & {G K} & 190 & 100\\
\rowcolor{tabelgrijs} 70100 & 36.6 & x & 5.6 & x & 35.9 & {G K} & 190 & 100\\
\rowcolor{white} 70100 & 6.6 & x & 53.63 & x & 35.9 & {G / K} & 9 & 10\\
\rowcolor{tabelgrijs} 70100 & 6.6 & x & 53.6 & x & 35.9 & {G} & 190 & 100\\
\rowcolor{white} 70100 & 6.6 & x & 5.6 & x & 35.9 & {G} & 1903 & 100\\
\rowcolor{tabelgrijs} 70100 & 6.6 & x & 53.6 &x & 35.9 & {G} & 190 & 100\\
\end{tabularx}
\end{document}
{}
on the gui. You can highlight code in your post using back-ticks. – user30471 Jan 17 '20 at 13:38times (×)
? – Bernard Jan 17 '20 at 14:38