I have a minor problem, although I'm unsure how to fix it. The two tables below show the tables as they appear in my thesis:
As you can see the space between the words 'Each' and 'successive' is too much. However when I try to replicate the problem with a MWE, the problem does not appear:
What could be causing the stretched words? I have other packages loaded in my main thesis document, but I don't think they are relevant to this problem.
My MWE is the following:
\documentclass{article}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\Centering\arraybackslash}p{#1}}
\begin{document}
\begin{table}[htbp]
\centering
\renewcommand\arraystretch{1.2}
\begin{threeparttable}
\caption{Course Load of a Representative EBE student}
\label{table:eng}
\begin{tabular}{@{}p{0.20\textwidth}*{3}{L{\dimexpr0.25\textwidth-2\tabcolsep\relax}}@{}}
\toprule
& \multicolumn{3}{c}{\bfseries Cumulative Number of Prescribed Credits}
\\
\cmidrule(l){2-4}
& BSc (Eng)& ASPECT & BSc (Geomatics) \\
\midrule
First-year & \multicolumn{1}{c}{144 -- 148} & \multicolumn{1}{c}{104 -- 116} & \multicolumn{1}{c}{142 -- 144} \\
Each successive \hbox{two-year} period\tnote{1} & \multicolumn{1}{c}{264 -- 294} & \multicolumn{1}{c}{232 -- 248} & \multicolumn{1}{c}{296 -- 330} \\
\bottomrule
\end{tabular}
\end{threeparttable}
\end{table}
\end{document}
Best Answer
The three first columns are set justified, and there is no hyphenation. You will find the same stretching if you change the type size to
\small
in your MWE. So probably you have a smaller point size for the tables in your document than in the MWE.Change the first (or the three first) column(s) to ragged right by using the new column type
L
that you have defined, i.e. :instead of
In my opinion, ragged right is better for this type of tables. Only if you have a column with lot of text, you may consider to set it justified, but then you often have to enforce manual hyphenation. And of course LaRiFaRi recommendation of using
microtype
is good, but will not solve this particular problem.In your definition of the centred column, you have used
\Centering
with capitalC
, change that to\centering
. If you change the last column to aC
column, the column names in the last three columns line up nicely. Complete MWE: