Graphics, Figures & TablesProblem of itemize inside longtable

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gaitat
Posts: 2
Joined: Wed Jul 14, 2010 11:32 am

Problem of itemize inside longtable

Post by gaitat »

Hello,

I am trying to place an itemized list inside a longtable but I am having trouble. Error message is cryptic to me.

Thank you for any help.

Code: Select all

\documentclass[a4paper,11pt]{report}

\usepackage{multirow}
\usepackage{multicol}
\usepackage{longtable}

\begin{document}

\begin{center}
\begin{longtable}{|l|l|l|}
\caption{\small Methods table summary.} \label{grid_mlmmh} \\

\hline
\multicolumn{1}{|c|}{\textbf{Method}} & 
\multicolumn{1}{c|}{\textbf{Advantages}} & 
\multicolumn{1}{c|}{\textbf{Disadvantages}} \\
\hline 
\endfirsthead

\multicolumn{3}{c}{\small \tablename\ \thetable{} -- continued from previous page \vspace{2mm}} \\
\hline
\multicolumn{1}{|c|}{\textbf{Method}} &
\multicolumn{1}{c|}{\textbf{Advantages}} &
\multicolumn{1}{c|}{\textbf{Disadvantages}} \\
\hline 
\endhead

\hline
\multicolumn{3}{|r|}{{\small continued on next page}} \\
\hline
\endfoot

\hline \hline
\endlastfoot

\textbf{ZZZ} & XXX & 
	\begin{itemize}
	  \item The first item 
	  \item The second item 
	  \item The third etc \ldots 
	\end{itemize} \\
\end{longtable}
\end{center}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

mirou
Posts: 18
Joined: Thu Apr 29, 2010 4:36 am

Re: Problem of itemize inside longtable

Post by mirou »

Hello there,

As far as I know, the normal itemization doesn't work inside a longtable. I'm facing the same issue and trying to see online solutions for it. Somewhere, someone has suggested that he uses a compactitem inside a paralist environment!!! which I don't know much about but having a look at.
Maybe together we can achieve something?
Good luck and stay tuned!! 8-)
mirou
Posts: 18
Joined: Thu Apr 29, 2010 4:36 am

Problem of itemize inside longtable

Post by mirou »

gaitat wrote:Hello,

I am trying to place an itemized list inside a longtable but I am having trouble. Error message is cryptic to me.

Thank you for any help.

Code: Select all

\documentclass[a4paper,11pt]{report}

\usepackage{multirow}
\usepackage{multicol}
\usepackage{longtable}

\begin{document}

\begin{center}
\begin{longtable}{|l|l|l|}
\caption{\small Methods table summary.} \label{grid_mlmmh} \\

\hline
\multicolumn{1}{|c|}{\textbf{Method}} & 
\multicolumn{1}{c|}{\textbf{Advantages}} & 
\multicolumn{1}{c|}{\textbf{Disadvantages}} \\
\hline 
\endfirsthead

\multicolumn{3}{c}{\small \tablename\ \thetable{} -- continued from previous page \vspace{2mm}} \\
\hline
\multicolumn{1}{|c|}{\textbf{Method}} &
\multicolumn{1}{c|}{\textbf{Advantages}} &
\multicolumn{1}{c|}{\textbf{Disadvantages}} \\
\hline 
\endhead

\hline
\multicolumn{3}{|r|}{{\small continued on next page}} \\
\hline
\endfoot

\hline \hline
\endlastfoot

\textbf{ZZZ} & XXX & 
	\begin{itemize}
	  \item The first item 
	  \item The second item 
	  \item The third etc \ldots 
	\end{itemize} \\
\end{longtable}
\end{center}

\end{document}
Post Reply