1

So I must use this "ACM Master Article Template" for my university assignment and I've chosen to write a "Systematic Review".

https://www.overleaf.com/latex/templates/association-for-computing-machinery-acm-large-2-column-format-template/qwcgpbmkkvpq

But I have some problems creating the table of the included studies.

I'm using this table as a template to create my own table of included studies.

This is the code I have so far:

\usepackage{pdflscape}

\pagebreak

\begin{landscape}

{\renewcommand\arraystretch{1.25}}
\begin{table}
  \caption{Characteristics of the included studies}
  \label{tab:freq}
  \begin{tabular}{llllllllll}
    \toprule
    \textbf{Study} & \textbf{Country} & \textbf{Age (Years)} & \textbf{Setting} & \textbf{Sample Size} & \textbf{Study Design} & \textbf{Description of Intervention} & \textbf{Comparison} & \textbf{Duration} & \textbf{Outcome of Measures}\\
    \midrule
    Fernández-Real 2012 & Spain & 55-80 & PREDIMED study centre & 127 & RCT & Participants were randomly assigned to the MD + EVOO and MD + NUTS group; dietitians gave personalized dietary advice to participants corresponding to different diets & Control group (low-fat diet) & 2 years & Total osteocalcin; procollagen 1 N-terminal propeptide levels; homeostasis model assessment-β-cell function\\
    \midrule
    Lorefält 2012 & Sweden & 83.8$\pm$ 7.7 years & Residential homes & 67 & Within-subjects design & A multifaceted intervention model including education on both theoretical and practical issues for staff; individualized snacks were served to the residents & Participants were their own controls & 1 year & Energy intake; Body weight; MNA score; length of night-time fasting\\
    \midrule
    Kimura 2013 & Japan & 65–90 & Community centre & Baseline: 141 Intervention: 92 & Cluster-RCT & Consisted of a general lecture on the importance of dietary variety and five educational sessions. & The control group was subsequently provided with the same program as a crossover intervention group & 3 months & Food intake; frequency score; dietary variety score; self-rated health; appetite;\\
    \midrule
    Gibson 2012 & UK & 65-85 & Residential area & 82 & RCT & Intervention group: FV intake ≥5 portions/day & Normal diet (FV intake ≤2 portions/day) & 16 weeks & Changes of FV intake (Mean $\pm$ SD); antibody assessment\\
  \bottomrule
\end{tabular}
\end{table}

\end{landscape}

\pagebreak 

This is what it spits out:

enter image description here

I want it to look as close as possible to this:

enter image description here

It has no line-breaks. I've been trying to follow this guide: How to add a forced line break inside a table cell

The problem is that just by adding the packages I get these errors:

The template doesn't have any "\usepackage{}" by default.

enter image description here

Also, just by using the \thead{} in the table head titles, I get an "undefined control sequence" error.

1 Answers1

2

Your table is huge ... so to fit it in one page you need to reduce font size and with some trial find column widths. For example as I do in the following MWE with >{\hsize=...\hsize}. In it I use tabularx column environment and columns L defined from X. I also use geometry package to define text area:

\documentclass[11pt]{article}
\usepackage[margin=20mm]{geometry} % <---
\usepackage{ragged2e}              % <---
\usepackage{booktabs, makecell, tabularx}       % <---
\renewcommand\theadfont{\footnotesize\bfseries} % <---
\renewcommand\theadgape{}                       % <---
\newcolumntype{L}{>{\RaggedRight}X}             % <---
\usepackage{pdflscape}

\begin{document}
    \begin{landscape}
\begin{table}
\footnotesize
\renewcommand\arraystretch{1.25}
\setlength\tabcolsep{4pt}
  \caption{Characteristics of the included studies}
  \label{tab:freq}
\begin{tabularx}{\linewidth}{@{} % <---
                                           L
                                           l
                        >{\hsize=0.6\hsize}L
                        >{\hsize=0.8\hsize}L
                        >{\hsize=0.8\hsize}L
                        >{\hsize=0.6\hsize}L
                        >{\hsize=1.65\hsize}L
                        >{\hsize=0.9\hsize}L 
                                           c
                        >{\hsize=1.65\hsize}L @{}}
    \toprule
\thead[lb]{Study}
    & \thead[lb]{Country}       & \thead[lb]{Age\\ (Years)}  & \thead[lb]{Setting}
    & \thead[lb]{Sample\\ Size} & \thead[lb]{Study\\ Design} & \thead[lb]{Description\\ of Intervention}
    & \thead[lb]{Comparison}    & \thead[lb]{Duration}       & \thead[lb]{Outcome\\ of Measures}  \\
    \midrule
Fernández-Real 2012
    & Spain     & 55-80                 & PREDIMED study centre
    & 127 & RCT & Participants were randomly assigned to the MD + EVOO and MD + NUTS group; dietitians gave personalized dietary advice to participants corresponding to different diets
    & Control group (low-fat diet) & 2 years & Total osteocalcin; procollagen 1 N-terminal propeptide levels; homeostasis model assessment-β-cell function\\
    \midrule
Lorefält 2012
    & Sweden    & $83.8\pm7.7$  years   & Residential homes
    & 67 & Within-subjects design & A multifaceted intervention model including education on both theoretical and practical issues for staff; individualized snacks were served to the residents & Participants were their own controls & 1 year & Energy intake; Body weight; MNA score; length of night-time fasting\\
    \midrule
Kimura 2013
    & Japan     & 65–90                 & Community centre
    & Baseline: 141 Intervention: 92 & Cluster-RCT & Consisted of a general lecture on the importance of dietary variety and five educational sessions. & The control group was subsequently provided with the same program as a crossover intervention group & 3 months & Food intake; frequency score; dietary variety score; self-rated health; appetite;\\
    \midrule
Gibson 2012
    & UK        & 65-85                 & Residential area
    & 82 & RCT & Intervention group: FV intake ≥5 portions/day & Normal diet (FV intake ≤2 portions/day) & 16 weeks & Changes of FV intake (Mean$\pm$SD); antibody assessment\\
  \bottomrule
\end{tabularx}
    \end{table}
\end{landscape}
\end{document}

enter image description here

Zarko
  • 296,517