2

I'm trying to create a ThreePartTable with a longtable, but the formatting is wrong and I get several errors:

  1. formatting: after the first head I get just half of a line, but from page 2 I get two lines.
  2. misplaced \noalign
  3. Extra alignment tab has been changed to \cr.

Code below:

\documentclass[a4paper,12pt,twoside,openright]{report}
\usepackage[left=4cm,right=3cm,top=3cm,bottom=4cm]{geometry}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{longtable}
\usepackage{threeparttablex}

\begin{document}
\begin{landscape}

\begin{ThreePartTable}
  \begin{TableNotes}  
    \small
   \end{TableNotes}
\begin{longtable}{p{3cm}p{2cm}p{2cm}p{3cm}p{3cm}p{2cm}p{2cm}}
  \caption{Something}\label{tab:s1}\\
  \toprule
 Model  & \raggedright Approach & Re-use & \raggedright Functionalities & Aim & Expressivity & \raggedright Object  \\
  \midrule    
 \endfirsthead

\multicolumn{7}{c}{{\bfseries \tablename\ \thetable{} -- continued from previous
page}}\\
\toprule
  Model  & \raggedright Approach & Re-use & \raggedright Functionalities & Aim & Expressivity & \raggedright Object  \\
  \midrule    
\endhead
\midrule
\multicolumn{7}{r}{{Continued on next page}} \\
\midrule
\endfoot
\bottomrule
%\insertTableNotes        
\endlastfoot
   \raggedright Del-Río-Ortega et al. (2010) & \raggedright OWL DL  Evaluation performed through case studies & \raggedright No & \raggedright Not declared & \raggedright Define commonly used PPIs and their relations with business processes & \raggedright Not declared & \raggedright PPIs \& Single enterprise\tabularnewline \hline
 \raggedright Wetzstein et al. (2008) & \raggedright WSML Evaluation through an example & No & \raggedright Not declared & \raggedright Integrate the monitoring activities into the semantic business process lifecycle & \raggedright Not declared & \raggedright PPIs \& Single enterprise\tabularnewline \hline
\raggedright KPIOnto (2013) & \raggedright OWL, MathML and OpenMath, Prolog and XSB as reasoning engine Evaluation through case studies & No & \raggedright Formula manipulation, equivalence checking, consistency checking and extraction of common indicators & \raggedright Integrate heterogeneous data in the context of VEs and evaluate common KPIs & \raggedright Not declared & \raggedright KPIs \& Virtual Enterprises\tabularnewline \hline
\raggedright Silva -- Enterprise Monitoring Ontology (2011) & \raggedright Language not declared Evaluation through case studies & \raggedright Enterprise Ontology (Dietz, 2006), Reference Ontology (Andersson, 2006) & \raggedright Not declared & \raggedright Provide a framework for the monitoring of value constellations & \raggedright Not declared & \raggedright KPIs \& Goals \& Value constellations\tabularnewline \hline
\raggedright BusCO Ontology (2007) & \raggedright Language not declared Evaluation through case study & No & \raggedright Not declared & \raggedright Provide an approach for the acquisition, management and monitoring of the intellectual capital & \raggedright Not declared & \raggedright KPIs \&  Goals\tabularnewline \hline  

  \end{longtable}
  \end{ThreePartTable}
\end{landscape}

\end{document}

Any suggestions?

1 Answer 1

2

There is a problem with \raggedright in the last column. Use always package ragged2e and \RaggedRight which allows hyphenation, too.

\documentclass[a4paper,12pt,twoside,openright]{report}
\usepackage[left=4cm,right=3cm,top=3cm,bottom=4cm]{geometry}
\usepackage{pdflscape}
\usepackage{threeparttable}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{longtable}
\usepackage{threeparttablex}
\usepackage{ragged2e}
\newcolumntype{P}[1]{>{\RaggedRight}p{#1}}

\begin{document}
\begin{landscape}

\begin{ThreePartTable}
\begin{TableNotes}  
\small
\end{TableNotes}
\begin{longtable}{P{3cm}P{2cm}P{2cm}P{3cm}P{3cm}P{2cm}P{2cm}}
\caption{Something}\label{tab:s1}\\\toprule
Model  &  Approach & Re-use &  Functionalities & 
        Aim & Expressivity &  Object  \\\midrule    
\endfirsthead
\multicolumn{7}{c}{\bfseries \tablename\ \thetable{} -- continued from previous page}\\
\toprule
Model  &  Approach & Re-use &  Functionalities & 
                Aim & Expressivity &  Object  \\
                \midrule    
                \endhead

                \midrule
                \multicolumn{7}{r}{{Continued on next page}} \\
                \midrule
                \endfoot

                \bottomrule
                %\insertTableNotes        
                \endlastfoot

                 Del-Río-Ortega et al. (2010) &  OWL DL  
                Evaluation performed through case studies &  No &  
                Not declared &  Define commonly used PPIs and their relations 
                with business processes &  Not declared &  PPIs \& 
                Single enterprise\tabularnewline \hline
                 Wetzstein et al. (2008) &  WSML Evaluation 
                through an example & No &  Not declared &  
                Integrate the monitoring activities into the semantic business process 
                lifecycle &  Not declared &  PPIs \& Single 
                enterprise\tabularnewline \hline
                 KPIOnto (2013) &  OWL, MathML and OpenMath, 
                Prolog and XSB as reasoning engine Evaluation through case studies & No & 
                 Formula manipulation, equivalence checking, consistency 
                checking and extraction of common indicators &  Integrate 
                heterogeneous data in the context of VEs and evaluate common KPIs & 
                 Not declared &  KPIs \& Virtual 
                Enterprises\tabularnewline \hline
                 Silva -- Enterprise Monitoring Ontology (2011) &  
                Language not declared Evaluation through case studies &  
                Enterprise Ontology (Dietz, 2006), Reference Ontology (Andersson, 2006) & 
                 Not declared &  Provide a framework for the 
                monitoring of value constellations &  Not declared & 
                 KPIs \& Goals \& Value constellations\tabularnewline \hline
                 BusCO Ontology (2007) &  Language not declared 
                Evaluation through case study & No &  Not declared & 
                 Provide an approach for the acquisition, management and 
                monitoring of the intellectual capital &  Not declared & 
                 KPIs \&  Goals\tabularnewline \hline  

            \end{longtable}
        \end{ThreePartTable}
    \end{landscape}

\end{document}

enter image description here

2
  • 1
    +1. For additional code cleanup, consider replacing the 4 or 5 cases of \hline with \midrule (or omitting them entirely). Provide the instructions \usepackage[T1]{fontenc} and \usepackage[utf8]{inputenc} if successful printing of accent-containing words such Río is essential. :-)
    – Mico
    Commented Jan 2, 2017 at 23:04
  • @Herbert Thank you so much for the solution and for taking the time of writing down the code!
    – Barbara
    Commented Jan 3, 2017 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .