I'm trying to make a table that should be pretty straight forward. But somehow, the text in the two first cells seems to "forget" that it's using the X
-alignment command in tabularx
:
\documentclass[a4paper,11pt]{article}
\usepackage{tabularx,multirow,booktabs,parskip,setspace,amsmath,amssymb}
%This is a colaborate document, there are a shitload of packages, but I believe these
%are the packages relevant for the problem.
\newcommand{\cubes}{m\textsuperscript{3}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\begin{document}
\begin{table}
\begin{minipage}[]{1\textwidth}
\centering
\caption{Expected energy consumption from desalination capacity \label{tab:energy-consumption}}
\begin{tabularx}{1\textwidth}{*{5}{C}}
\toprule
\multirow{2}{*}{Desalination method}&\multirow{2}{*}{Energy consumption [kW/\cubes]} & \multicolumn{3}{c}{Energy consumption from plant capacity} \\
& & 50,000 \cubes/d & 100,000 \cubes/d & 200,000 \cubes/d \\
\midrule
RO & 18 & $900\cdot 10^3$ & $1800\cdot 10^3$ & $3600 \cdot 10^3$ \\
MSF & 18 & $900\cdot 10^3$ & $1800\cdot 10^3$ & $3600 \cdot 10^3$ \\
MED & 12.5 & $625\cdot 10^3$ & $1250\cdot 10^3$ & $2500 \cdot 10^3$ \\
\bottomrule
\end{tabularx}
\end{minipage}
\end{table}
\end{document}
As the picture clearly shows, the result is not very esthetic (or readable). I would love the table to split "Desalination \\ method
" and "Energy \\ consumption ...
". Why does not this happen?
EDIT: The problem can be avoided by just skipping the \multirow
-calls and adjusting some tekst in the first row and some in the second (check out a screen dump of the table: http://grab.by/d2KC). But I still find the initial problem intriguing.