0

The longtable below produces the following error:

! Undefined control sequence.
\adl@@cr ...tempdima \xdef \adl@rowsL {\adl@rowsL 
                                                  (\adl@colsL /\number \adl@...
l.16         w
              hy? & {\_..V} & {\_..\'{\i}} & $\acute{\upsigma}$ & -ir & exam...

?

The error disappears if I remove the "table" option from xcolor, but I need that option independently, so that is a solution I cannot keep.

\documentclass[a4paper,12pt]{article}

\usepackage{amssymb,amsmath}
\usepackage{upgreek} %nicer greek symbols
\usepackage[dvipsnames,svgnames,table]{xcolor}

\usepackage{booktabs}           %Prettier
\usepackage{arydshln}           %With dotted lines  
\usepackage{longtable}          %Long
\usepackage{colortbl}

\begin{document}
\begin{center}
    \begin{longtable}{rccccc}
        \caption{\textit{Mid-to-high alternation in 3\textsuperscript{rd} conjugation verbs}} \label{spa-table} \\
        why? & {\_..V} & {\_..\'{\i}} & $\acute{\upsigma}$ & -ir & example \\ \hline \endhead
        1 & \textbf{i} & \textbf{i} & \textbf{i} & 118 & \textit{vivir} \\ \hline
    \rowcolor{lightgray}    2 & \textbf{i} & \textbf{e} & \textbf{i} & 73 & \textit{pedir} \\ \hline
        3 & \textbf{i} & \textbf{i} & \textbf{ie} & 4 & \textit{adquirir} \\ \hline
    \rowcolor{lightgray}    4 & \textbf{i} & \textbf{e} & \textbf{ie} & 68 & \textit{sentir} \\ \hline
        5 & \textbf{u} & \textbf{u} & \textbf{u} & 239 & \textit{fundir} \\ \hline
    \rowcolor{lightgray}    6 & \textbf{u} & \textbf{o} & \textbf{ue} & 5 & \textit{dormir} \\ \hline
        7 & \textbf{u} & \textbf{u} & \textbf{---} & 2 & \textit{balbucir} \\ \hline \hline
        1 & \textbf{e} & \textbf{e} & \textbf{e} & 10 & \textit{divergir} \\ \hline
        2 & \textbf{e} & \textbf{e} & \textbf{ie} & 4 & \textit{discernir} \\ \hline
        3 & \textbf{e} & \textbf{e} & \textbf{---} & 8 & \textit{agredir} \\ \hline
        4 & \textbf{o} & \textbf{o} & \textbf{o} & 9 & \textit{descolorir} \\ \hline
        5 & \textbf{o} & \textbf{o} & \textbf{ue} & 0 & \textit{--} \\ \hline
        6 & \textbf{o} & \textbf{o} & \textbf{---} & 3 & \textit{abolir} \\ \hline \hline
        1 & \textbf{a} & \textbf{*} & \textbf{a} & 52 & \textit{partir} \\ \hline
        2 & \textbf{a} & \textbf{*} & \textbf{---} & 5 & \textit{embair} \\ \hline \hline
        1 & \textbf{*} & \textbf{*} & \textbf{*} & 1 & \textit{ir} \\ \hline \hline
        &  & Total &  & 601 & \textit{} \\ \cline{3-5}
\end{longtable} 
\end{center}
\end{document}

Removing the \rowcolor command does not change anything, nor does adding "table" to the document class option. The error also remains if I remove colortbl.

7
  • Welcome to TeX.SE!
    – Mensch
    Feb 8 at 18:05
  • 1
    It is a bit unfair to complain about xcolor and longtable and colortbl when the error is from arydshln. Check the documentation of arydshln about the loading order (or avoid the package, it is difficult). Feb 8 at 18:19
  • Really? How do you know? In the meantime, I need arydshln independently, so removing it is not an option. But I reordered the table-related packages and NOW IT WORKS! Thank you for saving me!
    – Jelenak
    Feb 8 at 18:29
  • 1
    If you already load xcolor with the table option, you don't really need to load colortbl afterwards Feb 8 at 18:39
  • also you have not shown the error message just one small fragment of it with some of the context line but not the actual error rmessage (which you should always show in a code block as line endings are vital to read tex errors) Feb 8 at 19:28

1 Answer 1

0

Issue resolved! The answer was in the order of packages invoked, so here is the corrected order in case someone encounters the same obstacle:

\usepackage[table,dvipsnames,svgnames]{xcolor}
\usepackage{longtable}          
\usepackage{colortbl}
\usepackage{arydshln}           
\usepackage{booktabs}
1
  • 1
    By specifying the table option when loading xcolor, you are loading the colortbl package automatically. Hence, de facto you are loading colortbl before rather than after longtable -- contrary to the impression the code you posted creates.
    – Mico
    Feb 8 at 19:12

You must log in to answer this question.

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