Graphics, Figures & TablesIssue with multi-columned Cell

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Issue with multi-columned Cell

Post by marie2011 »

Dear forum members,

I was wondering if you could help me with this table I cannot compile. The error says:

Code: Select all

ERROR: File ended while scanning use of \multicolumn.

--- TeX said ---
! File ended while scanning use of \multicolumn.
--- HELP ---
No help available
And the minimal example is:

Code: Select all

\documentclass[
12pt,%
%  draft,%
  twoside,%
  BCOR10mm,%
%  bibtotocnumbered,% <= obsolete
bib=totoc,        % <= recommended
toc=listof,
toc=bibliography,
numbers=noenddot
]{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,ngerman,catalan,english]{babel}
\usepackage{longtable}
\usepackage{tablefootnote}

\begin{document}
\begin{longtable}{lp{13cm}}
 \caption{Aspect} \label{tab:aspects}  \\
 \hline
\textbf{Número} &\textbf{Comentario} \\ \hline
 \endfirsthead
\caption[]{Aspects} \\\hline
\textbf{Número} &\textbf{Comentario} \\ \hline
\endhead \hline
\multicolumn{2}{r}{{\emph{continuación}}\\ 
\hline
\endfoot
\hline \hline
\endlastfoot
\hline
1. &``Sentence in Spanish''\tablefootnote{(cita original)  ``Sentence
  in English.}.\\
 
\hline
\end{longtable}

\end{document}
The example does not work, since I am having problems. I assume there is a mistake with some elements, but I cannot find it.

Many thanks in advance.

Regards,
Marie

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

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Issue with multi-columned Cell

Post by kaiserkarl13 »

As LaTeX was trying to tell you, you're missing a brace after your multicolumn command (you have two, and need three due to the \emph command).
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Issue with multi-columned Cell

Post by marie2011 »

Hello kaiserkarl13,

Many thanks for your answer.

Here is the minimal working example.

Mi problem now is that the footnote does not appear at the end of the page.

Code: Select all

\documentclass[
12pt,%
%  draft,%
  twoside,%
  BCOR10mm,%
%  bibtotocnumbered,% <= obsolete
bib=totoc,        % <= recommended
toc=listof,
toc=bibliography,
numbers=noenddot
]{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,ngerman,catalan,english]{babel}
\usepackage{longtable}
\usepackage{tablefootnote}

\begin{document}
\begin{longtable}{lp{13cm}}
 \caption{Aspect} \label{tab:aspects}  \\
 \hline
\textbf{Número} &\textbf{Comentario} \\ \hline
 \endfirsthead
\caption[]{Aspects} \\\hline
\textbf{Número} &\textbf{Comentario} \\ \hline
\endhead \hline
\multicolumn{2}{r}{{\emph{continuación}}}\\ 
\hline
\endfoot
\hline \hline
\endlastfoot
\hline
1. &``Sentence in Spanish''\tablefootnote{(cita original)  ``Sentence
  in English''.}.\\
 
\hline
\end{longtable}
\end{document}
Many thanks in advance.

Regards,
Marie
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Issue with multi-columned Cell

Post by marie2011 »

Hello,

I replaced \tablefootnote for \footnote and everything works fine now.

Regards,
Marie
Post Reply