I am having a weird issue.
I am trying to create a table that requires multiline headers centered both horizontally and vertically. I figured out how to do this using
{\centering\arraybackslash}m{<fraction>\textwidth}
for each column header and does exactly what I want. However, even when i specify the fractions such that they all add to 0.85ish, the table extends past the main body of text into the margin between the body of text and margin notes. I have attached a bit of sample
\documentclass[12pt,a4paper,twoside]{report}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\author{Matthew Mouawad}
\usepackage[showframe]{geometry}
\usepackage{array}
\begin{document}
\begingroup
\renewcommand{\arraystretch}{1.5}
\begin{table}[ht]
\caption[Brachytherapy studies]{A list of studies reporting cosmetic outcome as well as with a focus on studies from the last 10 years}
\label{tab-brachy-review}
\footnotesize
\centering
\begin{tabular}{>{\centering\arraybackslash}m{0.28\textwidth}>{\centering\arraybackslash}m{0.07\textwidth}>{\centering\arraybackslash}m{0.15\textwidth}>{\centering\arraybackslash}m{0.13\textwidth}>{\centering\arraybackslash}m{0.14\textwidth}>{\centering\arraybackslash}m{0.085\textwidth}} %{cccccc}
\hline
test & test & test & test & test & test \\
1 & 2 & 3 & 4 & 5 & 6 \\
1 & 2 & 3 & 4 & 5 & 6 \\
1 & 2 & 3 & 4 & 5 & 6\\ \hline
\end{tabular}
\normalsize
\end{table}
\endgroup
\end{document}
\renewcommand{\arraystretch}{1.5}
immediately after\begin{table}[ht]
, you could dispense with the\begingroup
and\aftergroup
directives. Separately, there's no need for the\normalsize
directives since the scope of the earlier\footnotesize
directive ends with\end{table}
.