2

I've been having some issues with the longtable package. I'm creating a table for some UML Case Details but there must be something that I cannot find which is continuously giving me an error (Misplaced \omit. \multispan ->\omit ).

\documentclass[12pt]{article}

\usepackage{longtable}

\begin{document}


\begin{longtable}{| p{3.5cm} | p{2.5cm} | p{3.5cm} | p{2.5cm} |}

\caption{Use case detail}\label{chap3:tab1}

\multicolumn{4}{c}{}\\
\endfirsthead

\multicolumn{4}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\

\multicolumn{4}{c}{}\\
\hline
\endhead
\hline \multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot

\hline
%--------------------------------------------------------------------------------------------------------------
Use Case ID: & \multicolumn{3}{l|}{no}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Use Case Name: & \multicolumn{3}{l|}{nameaaaaaaaaaaaaaaaaaaaaaaa}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Created by: & & Last updated by: &\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Date created: & & Date last updated: &\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Actors & \multicolumn{3}{l|}{prova}\\
& \multicolumn{3}{l|}{prova}\\
& \multicolumn{3}{l|}{prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Description: & \multicolumn{3}{l|}{\parbox{8.5cm}{inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione inserire qui la descrizione }}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Preconditions: & \multicolumn{3}{l|}{1. prova}\\
& \multicolumn{3}{l|}{2. prova}\\
& \multicolumn{3}{l|}{3. prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Postconditions: & \multicolumn{3}{l|}{prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Normal flow: & \multicolumn{3}{l|}{1. prova}\\
& \multicolumn{3}{l|}{2. prova}\\
& \multicolumn{3}{l|}{3. prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Alternative flows: & \multicolumn{3}{l|}{prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Exceptions: & \multicolumn{3}{l|}{prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Notes and issues: & \multicolumn{3}{l|}{prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
%--------------------------------------------------------------------------------------------------------------
Attachments: & \multicolumn{3}{l|}{prova}\\
%--------------------------------------------------------------------------------------------------------------
\hline
\end{longtable}

\end{document}    

Now, I've put the \multicolumn{4}{c}{}\\ code before the head and foot because there isn't any recurrent header which I want to reiterate, so I inserted that blank line (which is necessary if I want the "continued from previous page/continued on next page" to be displayed correctly). As you can see on the images, the right margin is not displayed correctly, and the software won't export the pdf.

This is what Latexian displays on the live preview function, but fails to export the pdf This is what Latexian displays on the live preview function, but fails to export the pdf

4

You are missing a \\ after the caption

\multicolumn{4}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\

You could use \caption for that but either way you need a \\ at the end of the row.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.