I have the following (Non-working) example.
\renewcommand*{\arraystretch}{1.8}
\begin{longtable}{lcl}
\caption{Summary of proven determinants for falling}\\ \toprule
\label{tab:FallPredictionVariables}
\textbf{Author} &\textbf{Subject count (M:F)} & \textbf{Determinants}\\
\midrule
\noindent Author 1 &
1780 (?) &
\begin{itemize}%[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
\item Recent falls (last 2 months)
\item Agitation
\item Frequent toileting
\item Visual impairment
\end{itemize}\\
\noindent Author 2 &
311 (?) &
\begin{itemize}%[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
\item Posture sway
\item Two or more falls in previous year
\item Low hand grip strength
\item Depressive state of mind
\end{itemize}\\
\bottomrule
\end{longtable}
However, it works OK outside a longtable
environment:
\renewcommand*{\arraystretch}{1.8}
\begin{table}
\centering
\caption{Summary of proven determinants for falling}
\label{tab:FallPredictionVariables}
\begin{tabular}{lcp{60mm}}
\toprule
\textbf{Author} &\textbf{Subject count (M:F)} & \textbf{Determinants}\\
\midrule
\noindent Author 1 &
1780 (?) &
\begin{itemize}[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
\item Recent falls (last 2 months)
\item Agitation
\item Frequent toileting
\item Visual impairment
\end{itemize}\\
\noindent Author 2 &
311 (?) &
\begin{itemize}[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]
\item Posture sway
\item Two or more falls in previous year
\item Low hand grip strength
\item Depressive state of mind
\end{itemize}\\
\bottomrule
\end{tabular}
\end{table}
As you can see in the picture below, it does what I'm expecting (except there is some vertical space over the first item that I would like to remove, and the solutions posted in How to reduce vertical space itemize environment inside table only seem to work for tabularx
environments).
I'm unable to make my code work inside longtable
, and I really need it (the complete table is very long).
Any ideas for both things:
- To be able to have itemize inside
longtable
environment - Eliminate the extra space for the first item
PS: This is the preamble for both examples:
\documentclass[a4paper,twoside,11pt,openright]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
\usepackage[inline]{enumitem}
\usepackage{booktabs}
\begin{document}
...
\end{document}
\documentclass...\begin{document}...
and so on. Also we have to guess what packages are being loaded (especially annoying with multi-library packages liketikz
andpgfplots
), and it's a barrier to actually solving the problem. So MWE is always good if you want easy help. :-)