I have a table made using tabularx
and I'd like to merge some of the cells which have the same content so that only one entry is required. When I try to use multicolumn
as per enter link description here but this skews the table when additional text is added.
Can I have advice on either a) fixing the problem using tabularx
or b) a better package to accommodate large amounts of text and numbers?
I have attached an MWE and image of the output.
MWE
\documentclass[11pt,a4paper]{report}
\usepackage{color}
\usepackage[hidelinks]{hyperref}
\usepackage{graphicx, epstopdf}
\usepackage{etoolbox}%This package combined with the \pathcmd rewrites the standard style for 'Chapter' to allow the fancy horizontal and vertical lines.
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{mystyle}}{}{}
\graphicspath{{../Visuals/}}
\usepackage{gensymb}
\usepackage{adjustbox}
\usepackage{tabulary}
\usepackage{tabularx}
\usepackage{booktabs,caption, makecell}
\usepackage{pdflscape,afterpage,caption}
\usepackage[british]{babel}
\usepackage[backend=bibtex, citestyle=ieee, bibstyle=ieee]{biblatex}
\usepackage[section]{placeins}%Allows you to permanently fix figures.
\usepackage{titleps}%fancy page borders?
\usepackage[left=2.5cm, right=2.5cm, top=3.5cm, bottom=3.5cm]{geometry}
%\usepackage{caption}
\captionsetup[figure]{font=scriptsize,labelfont=scriptsize}
\usepackage{microtype}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{datetime}
\usepackage{lipsum}%random text generator. [1-XXXX] to specify the number of paragraphs.
\newdate{date}{28}{02}{2018}
\date{\displaydate{date}}
\onehalfspacing
\setcounter{secnumdepth}{3}
\newcolumntype{Z}{ >{\centering\arraybackslash}X }
\renewcommand\theadfont{\bfseries}
%\renewcommand\theadalign{cc}
\usepackage[autolanguage, np]{numprint}
\begin{document}
\begin{table}[!h]
\setlength\tabcolsep{4pt}
\caption{Caption}
\begin{tabularx}{\textwidth}{*{6}{Z}}
%\toprule
\multicolumn{4}{c}{} \\
\midrule
\thead{Test} & \thead{Theoretical \\ Yield (mg)} & \thead{Flow \\ rates \\} & \thead{Residence \\ time, \\ $\tau$ (minutes)} & \thead{Temperature \\ ($\degree$C)} & \thead{Solvent} \\%
\midrule
1 & TEXT & TEXT & TEXT & TEXT & TEXT \\
2 & 70.0 & 64, 65, 71 & 10 & -15 & DCM \\
3 & 70.0 & 64, 65, 71 & 10 & 5 & DCM \\
4 & 70.0 & 64, 65, 71 & 10 & 10 & DCM \\
\bottomrule
\label{Label}
\end{tabularx}
\end{table}
\end{document}
Thanks in advance!
\multicolumn
in your code has an empty content , so where is the problem?