rolfn / xltabular

LaTeX package which combines longtable and tabularx.
Other
10 stars 3 forks source link

Error: "Argument of \__siunitx_table_collect_token:N has an extra }." reported at \end{tabularx} #19

Closed BoiseStateCS410 closed 2 years ago

BoiseStateCS410 commented 2 years ago

The above error happens to this file. To remove the error, I comment out ll 39-40 (that invoke siunitx) and change the "S" in line 71 to an "r". I could not find anywhere (outside the package code) to have any effect on the siunitx_table data structure. Can you provide guidance to help make this work? Thanks.

% % Mike Lynott % Table example % Oct, 2022 % % This example was created out of frustration with working with many % combinations of table-related packages. It is of course imperfect, % but does show many features of the table commands in latex. % % It would be better if the number of days was formatted in a more % math-appropriate way. % % Assembled with help from these websites: % https://tex.stackexchange.com/questions/563988/xltabular-threeparttable-across-multiple-pages % https://tex.stackexchange.com/questions/255223/how-to-break-tablenotes-page-break-in-longtable-with-threeparttablex % https://tex.stackexchange.com/questions/21243/automatic-table-row-numbers % https://tex.stackexchange.com/questions/12703/how-to-create-fixed-width-table-columns-with-text-raggedright-centered-raggedlef % https://latex.org/forum/viewtopic.php?t=13693 % % Possible further help. % https://tex.stackexchange.com/questions/31672/column-and-row-padding-in-tables % % https://tex.stackexchange.com/questions/196303/converting-threeparttable-tabular-to-threeparttablex-and-longtable % % Everything in this document is necessary to get the desired outcome. % \documentclass{article} \usepackage{xltabular} \usepackage{threeparttablex} \usepackage{booktabs, caption} % % Declare the counter and the new command which will allow the optional % addition of a sequence number when "\rnum" is inserted. % \newcounter{rowcount} \setcounter{rowcount}{0} \newcommand\rnum{\stepcounter{rowcount}\arabic{rowcount}} \renewcommand{\arraystretch}{1.4} \usepackage{siunitx} \sisetup{table-format=3} \begin{document} % These commands produce a table that has % a top caption % a rule % a line of bold italic title text % a rule % extra spacing before and after each row (from renewed "arraystretch" % an optionally numbered line of text. % The first column contains an optional sequence number if "\rnum" % is entered; blank if it is not. % The second, third and fifth columns contain ragged-right text. % The fourth column is centered and contains a "Y" or blank. % The sixth column contains a right-justified decimal number % Some lines are followed by a line, generated by "\hline". % The table continues over multiple pages. at the bottom of the page, % the text "to be continued on the next page" appears. % On subsequent pages, there is a different top caption: % "(continued from previous page" % The column headings are repeated. % At the bottom of the last page are "tablenotes"--which appear early % in the definition of the table. % \begin{ThreePartTable} \begin{TableNotes}[flushleft, para] \footnotesize \item Note that the Estimated days'' column indicates the time for each participant. \end{TableNotes} \centering \small \begin{xltabular}{\linewidth} {|r|*2{>{\raggedright\arraybackslash}X|}c|*1{>{\raggedright\arraybackslash}X}|S|} \caption{This is the detailed project plan referenced in Chapter 6.}\label{table_get_graphs}\\ \toprule \textit{\textbf{\begin{tabular}[c]{@{}l@{}}\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Task\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}SubTask\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Committee\\ Required? \end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Deliverable\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Est.\\days\end{tabular}}} \\ \midrule \endfirsthead \caption{(continued from previous page)} \\ \toprule \textit{\textbf{\begin{tabular}[c]{@{}l@{}}\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Task\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}SubTask\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Committee\\ Required? \end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Deliverable\end{tabular}}} & \textit{\textbf{\begin{tabular}[c]{@{}l@{}}Est.\\days\end{tabular}}} \\ \midrule \endhead \bottomrule \multicolumn{4}{r}{\footnotesize to be continued on the next page} \endfoot \bottomrule \insertTableNotes \endlastfoot \rnum & Graph criteria & Propose criteria for subject graphs & & Draft criteria document & .5 \\ \rnum & & Review criteria with the committee & Y & & 1 \\ \rnum & & Revise until acceptance & Y & Agreed criteria document & .5 \\ \hline \rnum & Review process, progress, repository & Propose criteria for review & & Draft review criteria & .5 \\ \rnum & & Review, revise criteria until acceptance by committee & Y & Agreed review criteria & 1 \\ \rnum & & Conduct review(s) per criteria monthly & Y & Action items & 3 \\ \rnum & & Respond to review action items until resolution & Y & Action item resolution & 3 \\ \hline \rnum & Infrastructure for subject graphs & Create a github repository & & New github repository & .5 \\ \rnum & & Maintain github repository & & Revised github repository, change note & 1 \\ \hline \rnum & Retrieve graphs from personal, colleague's papers & Review for candidate graphs & & & 2 \\ \rnum & & Select candidate graphs & & List of graphs & .5 \\ \rnum & & Convert candidate graphs into GML & & Set of GML files & 1 \\ \rnum & & Load graphs into repository & & Revised github repository & .5 \\ \hline \rnum & Retrieve graphs from published texts & Review published texts (textbooks, non-scholarly texts) by authors listed below & & & 0 \\ \rnum & & Barker & & & 2 \\ \rnum & & Cielko & & & 1 \\ \rnum & & Elmasri, Navathe & & & 1 \\ \rnum & & Hay & & & 2 \\ \rnum & & Martin, McClure & & & 1 \\ \rnum & & Silverston & & & 2 \\ \rnum & & Simsion, Witt & & & 2 \\ \rnum & & Viescas, Hernandez & & & 1 \\ \rnum & & Convert candidate graphs into GML & & gml files & 5 \\ \rnum & & Load graphs into repository & & Revised github repository & 1 \\ \hline \rnum & Assembled scholarly papers & Review assembled scholarly papers & & & 2 \\ \rnum & & Select candidate graphs & & List of graphs & 1 \\ \rnum & & Convert candidate graphs into graph language & & Local repository of files & 2 \\ \rnum & & Load graphs into repository & & Revised github repository & .5 \\ \hline \rnum &Rome'' graphs & Identify site for Rome graphs & & & 0 \ \rnum & & Select candidate graphs per criteria & & List of graphs & 2 \ \rnum & & Copy selected files & & Local repository of files & .5 \ \rnum & & Load graphs into repository & & Revised github repository & .5 \ \rnum & ``North'' graphs & Identify site for Rome graphs & & & 0 \ \rnum & & Select candidate graphs per criteria & & List of graphs & 2 \ \rnum & & Copy selected files & & Local repository of files & .5 \ \rnum & & Load graphs into repository & & Revised github repository & .5 \ \hline ~ & \emph{Total from known repositories} & & & & 45 \end{xltabular} \end{ThreePartTable} \end{document}

hvoss49 commented 2 years ago

Your example should be:

[...]
\rnum & & Select candidate graphs per criteria & & List of graphs & 2 \\
\rnum & & Copy selected files & & Local repository of files & .5 \\
\rnum & & Load graphs into repository & & Revised github repository & .5 \\
\rnum & ``North'' graphs & Identify site for Rome graphs & & & 0 \\
\rnum & & Select candidate graphs per criteria & & List of graphs & 2 \\
\rnum & & Copy selected files & & Local repository of files & .5 \\
\rnum & & Load graphs into repository & & Revised github repository & .5 \\ \hline
~ & \emph{Total from known repositories} & & & & 45\\
\end{xltabular}

If I correct this I have no problem with an up-to-date TeXLive 2022

BoiseStateCS410 commented 2 years ago

Thank you very much! That works perfectly. Mike