I'm using longtable to create a my table. I am getting the table I want but I'm getting this error:
Misplaced \noalign. You have used a \hline command in the wrong place,
probably outside a table. If the \hline command is written inside a
table, try including \ before it.
Here is the code of my table:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage[hmargin=2cm]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{longtable}
\begin{document}
\begin{center}
\begin{longtable}{|l|l|l|l|l|}
\caption{Tableau récapitulatif des modèles de prédiction de l’évolution de communautés dans la littérature} \label{tab:long} \\
\hline \multicolumn{1}{|c|}{\textbf{Méthode}} & \multicolumn{1}{c|}{\textbf{Entrée}} & \multicolumn{1}{c|}{\textbf{Algorithme}} & \multicolumn{1}{c|}{\textbf{Validation} } & \multicolumn{1}{c|}{\textbf{Résultats}} \\ \hline
\endfirsthead
\hline \multicolumn{5}{|r|}{{(Voir la page suivante)}} \\ \hline
\endfoot
\hline \hline
\endlastfoot
\parbox{62pt}{\raggedright
\cite{Goldberg2011}
} & \parbox{88pt}{\raggedright
\addlinespace
\textbullet{} Métriques significatives : la densité, l’intersection et la taille du noyau d’une communauté.
\addlinespace
} & \parbox{79pt}{\raggedright
\textbullet{ }Prédicteur de durée de vie d’une communauté.
} & \parbox{71pt}{\raggedright
\textbullet{} Leave-one-out cross validation.
} & \parbox{78pt}{\raggedright
\addlinespace
\textbullet{} Les communautés intenses, petites et stables ont les plus longues durées de vie.
\addlinespace
} \\
\hline
\end{longtable}
\end{center}
\end{document}
How can I escape those errors?
Best Answer
It is not clear to me, what you like to achieve with
\addlinespace
(erors done with your use is explained in David Carlisle answer). More vertical space around cells? For more items in one cell, I would use (adopted for use in table)\itemize
environment: