I use the following code to produce a table (using XeLaTex):
%!TEX encoding = UTF-8 Unicode
\documentclass[twoside,a4paper]{article}
%---- Allow the insertion of graphics and tables ----%
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow}
%---- Set margins ----%
\usepackage{geometry}
\geometry{a4paper,total={210mm,297mm},
left=20mm,
right=20mm,
top=25mm,
bottom=25mm,
}
%---- Set line spacing to 1.5 lines ----%
\usepackage{setspace}
\onehalfspacing
%----- Set fonts ----%
\usepackage{fontspec}
\setmainfont{Calibri}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Table title}
\resizebox{160mm}{!}{
\begin{tabular}{ccccc}
\toprule
\multirow{2}[2]{*}{\textbf{Col. 1}} & \multicolumn{2}{c}{\textbf{Section 1 title}} & \multicolumn{2}{c}{\textbf{Extremely long section title in multicolumn}} \\
& \textbf{Subtitle A} & \textbf{Subtitle B} & \textbf{Subtitle C} & \textbf{Subtitle C} \\
\midrule
Row 1 & xxx & xxx & xxx & xxx \\
Row 2 & xxx & xxx & xxx & xxx \\
Row 3 & xxx & xxx & xxx & xxx \\
Row 4 & xxx & xxx & xxx & xxx \\
Row 5 & xxx & xxx & xxx & xxx \\
\toprule
\textbf{Total} & \textbf{xxx} & \textbf{xxx} & \textbf{xxx} & \textbf{xxx} \\
\bottomrule
\end{tabular}%
}
\label{tab:addlabel}%
\end{table}%
\end{document}
I would like to do two things:
Manually insert line breaks in certain cells:
"Subtitle A" and "Subtitle B" - insert breaks between "Subtitle" and "A"/"B"
"Extremely long..." - insert break between "Extremely long section" and "title in multicolumn"
- Make the columns "Subtitle A" to "Subtitle D" the same width (larger than "Col. 1")
How can this be achieved?