0

I'm trying to make a table with multicolumns, in order to get something like this:enter image description here

But when I compile I get this error and can't figure out why:

!Misplaced \omit.\multispan -> \omit\omit@multispan multicolumn{4}{c}{\textbf{Jamiltepec}}

Here is my MWE:

\documentclass[10pt,cleardoublepage=empty,twoside]{book}
\usepackage[a5paper]{geometry}
\usepackage{longtable}
\usepackage[T1]{fontenc} 
\usepackage{booktabs}
\usepackage{lscape}
\begin{document}

\begin{landscape}
\begin{centering}
{\footnotesize
\begin{longtable}{cccccccc}

\caption{Termometría obtenida a partir del contenido de Ti en cristales de zircón.}\\\toprule
    \label{tab:tabla13}
\multicolumn{4}{c}{\textbf{Jamiltepec}} & \multicolumn{2}{c}{\textbf{Progreso}} & \multicolumn{2}{c}{\textbf{Río Grande}} \\

    \cmidrule(lr){1-4}
    \cmidrule(lr){5-6}
    \cmidrule(lr){7-8}
    \textbf{Spot/Muestra} & \textbf{T(°C)} & \textbf{Spot/Muestra} & \textbf{T(°C)} & \textbf{Spot/Muestra} & \textbf{T(°C)} & \textbf{Spot/Muestra} & \textbf{T(°C)} \\\midrule
    \endhead

        \textbf{HG-019A Zrn 01} & 749.4 & \textbf{HG-022 Zrn 03} & 992.3 & \textbf{HG-024F Zrn 01} & 769.5 & \textbf{HG-029 Zrn 02} & 720.6 \\
    \textbf{HG-019A Zrn 03} & 749.4 & \textbf{HG-022 Zrn 04} & 740.0 & \textbf{HG-024F Zrn 02} & 691.0 & \textbf{HG-029 Zrn 07} & 705.5 \\
    \textbf{HG-019A Zrn 04} & 722.9 & \textbf{HG-022 Zrn 06} & 722.9 & \textbf{HG-024F Zrn 03} & 713.3 & \textbf{HG-029 Zrn 12} & 747.6 \\
    \textbf{HG-019A Zrn 05} & 766.4 & \textbf{HG-022 Zrn 08} & 756.5 & \textbf{HG-024F Zrn 05} & 769.5 & \textbf{HG-029 Zrn 13} & 747.6 \\
    \textbf{HG-019A Zrn 06} & 745.7 & \textbf{HG-022 Zrn 09} & 727.4 & \textbf{HG-024F Zrn 06} & 726.8 & \textbf{HG-029 Zrn 14} & 889.4 \\
    \textbf{HG-019A Zrn 09} & 772.5 & \textbf{HG-022 Zrn 10} & 694.0 & \textbf{HG-024F Zrn 30} & 699.9 & \textbf{HG-029 Zrn 16} & 674.1 \\
    \textbf{HG-019A Zrn 16} & 807.6 & \textbf{HG-022 Zrn 11} & 738.0 & \textbf{HG-024F Zrn 31} & 669.1 & \textbf{HG-029 Zrn 8b} & 702.7 \\
    \textbf{HG-019A Zrn 17} & 741.9 & \textbf{HG-022 Zrn 12} & 749.4 & \textbf{HG-024F Zrn 32} & 686.2 & \textbf{HG-029 Zrn 26} & 786.7 \\
    \textbf{HG-019A Zrn 18} & 738.0 & \textbf{HG-022 Zrn 16} & 738.0 & \textbf{HG-024F Zrn 34} & 715.8 & \textbf{HG-029 Zrn 31} & 733.9 \\
    \textbf{HG-019A Zrn 20} & 751.2 & \textbf{HG-022 Zrn 17} & 764.8 & \textbf{HG-024F Zrn 40} & 713.3 & \textbf{HG-029 Zrn 39} & 738.0 \\
    \textbf{HG-019A Zrn 22} & 759.9 & \textbf{HG-022 Zrn 23} & 696.1 & \textbf{HG-024F Zrn 41} & 790.6 & -     & - \\
    \textbf{HG-019A Zrn 26} & 704.1 & \textbf{HG-022 Zrn 24} & 740.0 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 27} & 766.4 & \textbf{HG-022 Zrn 28} & 819.5 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 30} & 662.3 & \textbf{HG-022 Zrn 29} & 1023.3 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 33} & 731.8 & \textbf{HG-022 Zrn 30} & 725.2 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 36} & 804.1 & \textbf{HG-022 Zrn 33} & 682.2 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 38} & 769.5 & \textbf{HG-022 Zrn 35} & 743.8 & -     & -     & -     & - \\
    -     & -     & \textbf{HG-022 Zrn 36} & 681.9 & -     & -     & -     & - \\
    -     & -     & \textbf{HG-022 Zrn 37} & 730.5 & -     & -     & -     & - \\
    -     & -     & \textbf{HG-022 Zrn 40} & 727.4 & -     & -     & -     & - \\\bottomrule

 \end{longtable}
}
\end{centering}
\end{landscape}
\end{document}

Any help would be awesome. Thanks in advance.

1
  • I got errors with respect to the encoding too. Make sure that you use UTF-8 \usepackage[utf8]{inputenc} instead of \usepackage[T1]{fontenc} and \textdegree for degree sign. – Sina Ahmadi May 5 '20 at 1:24
1

Your label maybe interfering --mov it elsewhere

enter image description here

\documentclass[10pt,cleardoublepage=empty,twoside]{book}
\usepackage[a5paper]{geometry}
\usepackage{longtable}
\usepackage[T1]{fontenc} 
\usepackage{booktabs}
\usepackage{lscape}
\begin{document}

\begin{landscape}
\centering
{\footnotesize
\begin{longtable}{cccccccc}

\caption{Termometría obtenida a partir del contenido de Ti en cristales de zircón.}\\\toprule
%    \label{tab:tabla13}
\multicolumn{4}{c}{\textbf{Jamiltepec}} & \multicolumn{2}{c}{\textbf{Progreso}} & \multicolumn{2}{c}{\textbf{Río Grande}} \\

    \cmidrule(lr){1-4}
    \cmidrule(lr){5-6}
    \cmidrule(lr){7-8}
    \textbf{Spot/Muestra} & \textbf{T(°C)} & \textbf{Spot/Muestra} & \textbf{T(°C)} & \textbf{Spot/Muestra} & \textbf{T(°C)} & \textbf{Spot/Muestra} & \textbf{T(°C)} \\\midrule
    \endhead

        \textbf{HG-019A Zrn 01} & 749.4 & \textbf{HG-022 Zrn 03} & 992.3 & \textbf{HG-024F Zrn 01} & 769.5 & \textbf{HG-029 Zrn 02} & 720.6 \\
    \textbf{HG-019A Zrn 03} & 749.4 & \textbf{HG-022 Zrn 04} & 740.0 & \textbf{HG-024F Zrn 02} & 691.0 & \textbf{HG-029 Zrn 07} & 705.5 \\
    \textbf{HG-019A Zrn 04} & 722.9 & \textbf{HG-022 Zrn 06} & 722.9 & \textbf{HG-024F Zrn 03} & 713.3 & \textbf{HG-029 Zrn 12} & 747.6 \\
    \textbf{HG-019A Zrn 05} & 766.4 & \textbf{HG-022 Zrn 08} & 756.5 & \textbf{HG-024F Zrn 05} & 769.5 & \textbf{HG-029 Zrn 13} & 747.6 \\
    \textbf{HG-019A Zrn 06} & 745.7 & \textbf{HG-022 Zrn 09} & 727.4 & \textbf{HG-024F Zrn 06} & 726.8 & \textbf{HG-029 Zrn 14} & 889.4 \\
    \textbf{HG-019A Zrn 09} & 772.5 & \textbf{HG-022 Zrn 10} & 694.0 & \textbf{HG-024F Zrn 30} & 699.9 & \textbf{HG-029 Zrn 16} & 674.1 \\
    \textbf{HG-019A Zrn 16} & 807.6 & \textbf{HG-022 Zrn 11} & 738.0 & \textbf{HG-024F Zrn 31} & 669.1 & \textbf{HG-029 Zrn 8b} & 702.7 \\
    \textbf{HG-019A Zrn 17} & 741.9 & \textbf{HG-022 Zrn 12} & 749.4 & \textbf{HG-024F Zrn 32} & 686.2 & \textbf{HG-029 Zrn 26} & 786.7 \\
    \textbf{HG-019A Zrn 18} & 738.0 & \textbf{HG-022 Zrn 16} & 738.0 & \textbf{HG-024F Zrn 34} & 715.8 & \textbf{HG-029 Zrn 31} & 733.9 \\
    \textbf{HG-019A Zrn 20} & 751.2 & \textbf{HG-022 Zrn 17} & 764.8 & \textbf{HG-024F Zrn 40} & 713.3 & \textbf{HG-029 Zrn 39} & 738.0 \\
    \textbf{HG-019A Zrn 22} & 759.9 & \textbf{HG-022 Zrn 23} & 696.1 & \textbf{HG-024F Zrn 41} & 790.6 & -     & - \\
    \textbf{HG-019A Zrn 26} & 704.1 & \textbf{HG-022 Zrn 24} & 740.0 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 27} & 766.4 & \textbf{HG-022 Zrn 28} & 819.5 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 30} & 662.3 & \textbf{HG-022 Zrn 29} & 1023.3 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 33} & 731.8 & \textbf{HG-022 Zrn 30} & 725.2 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 36} & 804.1 & \textbf{HG-022 Zrn 33} & 682.2 & -     & -     & -     & - \\
    \textbf{HG-019A Zrn 38} & 769.5 & \textbf{HG-022 Zrn 35} & 743.8 & -     & -     & -     & - \\
    -     & -     & \textbf{HG-022 Zrn 36} & 681.9 & -     & -     & -     & - \\
    -     & -     & \textbf{HG-022 Zrn 37} & 730.5 & -     & -     & -     & - \\
    -     & -     & \textbf{HG-022 Zrn 40} & 727.4 & -     & -     & -     & - \\\bottomrule

 \end{longtable}
}

\end{landscape}
\end{document}
1
  • Yay! As simply as that! Thank you a lot! – Hermes May 5 '20 at 2:26

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.