1

I have the following table and I want to modify two things:

1) Shrink the first column by possibly using two or more lines for the citation 2) Using bullet points for the last column content.

\begin{table*}[th!]
  \center
  \scriptsize
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{lllllX}
    Article & Methodology & Model objective & Decision phase & Vehicle Types & Features\\
    \hline
    \cite{ma2017designing} & \begin{tabular}[c]{@{}l@{}}Linear\\ programming\end{tabular} & \begin{tabular}[c]{@{}l@{}}Minimize traffic\\ on arcs\end{tabular} & \begin{tabular}[c]{@{}l@{}}Operational,\\ rolling horizon\end{tabular} & SAV           & \begin{tabular}[c]{@{}l@{}}No carpooling\\ Parking at any node\\ Simulated traffic congestion\\ Flexible departure times\end{tabular} \\
    \hline
    \cite{hyland2018dynamic} & \begin{tabular}[c]{@{}l@{}}Agent-based\\ simulation\end{tabular} & \begin{tabular}[c]{@{}l@{}}Minimize miles\\ driven and\\ client wait times\end{tabular} & \begin{tabular}[c]{@{}l@{}}Operational,\\ rolling horizon,\\ real-time\end{tabular} & SAV & \begin{tabular}[c]{@{}l@{}}No carpooling\\ No info on parking\\ No traffic congestion\\ Flexible pick up time\\ Fixed number of AVs per day\end{tabular} \\
    \hline
  \end{tabularx}
\end{table*}

Below is a screenshot to see how it currently looks like. For my modification 1, I couldn't find a proper way. If I used a numbered in-text citation, I would not have such an issue but it is not an option. For the second one, I found some useful links such as this and that but they require using tabular instead of tabularx.

enter image description here

moewe
  • 175,683
tcokyasar
  • 233
  • 1
    You can try a p type column for the first column. – leandriis Aug 09 '19 at 16:28
  • Can you please provide an example? – tcokyasar Aug 09 '19 at 16:41
  • I tried this: {p{0.09\linewidth}llllX}. It works but introduces new problems. Citations start after a single line space and some lines include first and last name abbreviations in a very weird way like (K. M.) – tcokyasar Aug 09 '19 at 17:15
  • Could you please ake your code compilable by adding the documentclass as well as the relevant packages and also two example citations? (See https://tex.meta.stackexchange.com/q/4407/134144) – leandriis Aug 09 '19 at 17:36

1 Answers1

1

Here is a suggestion based on assumptions and gesses about the documentclass and citations used. I have used a left aligned p type column for the first column as well as for the last column. To get the bullet points in the last column, I have defined a new environment tabitem with the help of the enumitem package. Lastly, I have removed teh nested tabulars in columns 2-4 and used left aligned X txpe columns for them. As you can see from the following screenshots and example, you could even increase teh font size from \scriptsize fo \footnotesize of even \small and still fit the table nicely into the textwidth. If your table should becoome too long for a single page, you might want to have a look at the xltabular package.

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{tabularx}
\usepackage{tabulary}

\usepackage{booktabs}

\usepackage{enumitem}
\newlist{tabitem}{itemize}{1}
\setlist[tabitem]{wide=0pt, nosep, leftmargin= * ,label=\textbullet,after=\vspace{-\baselineskip},before=\vspace{-0.6\baselineskip}}

\usepackage[style=authoryear-comp]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{ma2017designing,
  author = {Ma, A.},
  year = {2007},
  title = {Title},
  publisher = {Publisher},
}
@book{hyland2018dynamic,
  author = {Hyland, A. and Mahmassani},
  year = {2018},
  title = {Title},
  publisher = {Publisher},
}
\end{filecontents}


\begin{document}

\begin{table*}[th!]
  \center
  \scriptsize
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{1.5cm}*{3}{>{\raggedright\arraybackslash}X}lp{4cm}}
    Article & Methodology & Model\newline objective & Decision phase & Vehicle Types & Features\\
    \toprule
    \cite{ma2017designing} & Linear programming & Minimize traffic on arcs & Operational, rolling horizon & SAV           & \begin{tabitem} \item No carpooling \item Parking at any node \item Simulated traffic congestion \item Flexible departure times\end{tabitem} \\
    \midrule
    \cite{hyland2018dynamic} & Agent-based simulation & Minimize miles driven and client wait times & Operational, rolling horizon, real-time & SAV & \begin{tabitem}\item No carpooling \item No info on parking \item No traffic congestion \item Flexible pick up time \item Fixed number of AVs per day\end{tabitem} \\
    \bottomrule
  \end{tabularx}
\end{table*}

\begin{table*}[th!]
  \center
  \footnotesize
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{1.5cm}*{3}{>{\raggedright\arraybackslash}X}lp{4.2cm}}
    Article & Methodology & Model\newline objective & Decision phase & Vehicle Types & Features\\
    \toprule
    \cite{ma2017designing} & Linear programming & Minimize traffic on arcs & Operational, rolling horizon & SAV           & \begin{tabitem} \item No carpooling \item Parking at any node \item Simulated traffic congestion \item Flexible departure times\end{tabitem} \\
    \midrule
    \cite{hyland2018dynamic} & Agent-based simulation & Minimize miles driven and client wait times & Operational, rolling horizon, real-time & SAV & \begin{tabitem}\item No carpooling \item No info on parking \item No traffic congestion \item Flexible pick up time \item Fixed number of AVs per day\end{tabitem} \\
    \bottomrule
  \end{tabularx}
\end{table*}

\begin{table*}[th!]
  \center
  \small \setlength{\tabcolsep}{4pt}
  \caption{Systematic literature review.\label{tab:lit_rev}}
  \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}p{2cm}*{3}{>{\raggedright\arraybackslash}X}lp{4.4cm}}
    Article & Methodology & Model\newline objective & Decision phase & Vehicle Types & Features\\
    \toprule
    \cite{ma2017designing} & Linear programming & Minimize traffic on arcs & Operational, rolling horizon & SAV           & \begin{tabitem} \item No carpooling \item Parking at any node \item Simulated traffic congestion \item Flexible departure times\end{tabitem} \\
    \midrule
    \cite{hyland2018dynamic} & Agent-based simulation & Minimize miles driven and client wait times & Operational, rolling horizon, real-time & SAV & \begin{tabitem}\item No carpooling \item No info on parking \item No traffic congestion \item Flexible pick up time \item Fixed number of AVs per day\end{tabitem} \\
    \bottomrule
  \end{tabularx}
\end{table*}

\end{document}
leandriis
  • 62,593