0

I have this code

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[margin=2.5cm]{geometry}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{siunitx}
\usepackage[skip=0.33\baselineskip]{caption}

\captionsetup[table]{
    font=bf,
    size=normalsize,
    justification=centerlast,
    labelsep=newline
    }
\renewcommand\thetable{\Roman{table}}

\begin{document}
\listoftables
\appendix
\vspace{5ex}
\section{Appendix}
\setcounter{table}{0}
\renewcommand{\thetable}{\Alph{section}.\Roman{table}}
\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}

\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}

\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}

\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}

\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}

\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}

\def\arraystretch{1.5}
\begin{table}[h]
\centering
\setlength\tabcolsep{0pt}
\sisetup{table-format=2.2, group-separator={,}, group-minimum-digits=4}
\caption{\large{Some Data}}
\medskip\small\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                l
                S[table-format=-2.2]
           *{6}{S}
                }
\toprule
\multicolumn{1}{c}{\multirow{2}{*}{Description}}&
\multicolumn{1}{c}{\multirow{2}{*}{Variable}}&
\multicolumn{5}{c}{More variables}\\\cmidrule{3-7}
\multicolumn{2}{c}{}&{Value 1}&{Value 2}&{Value 3}&{Value 4}&{Value 5}\\\midrule
Variable &11.11 &22.22 &33.33 &44.44 &55.55 &66.66\\
\bottomrule
\end{tabular*}
\end{table}
\end{document}

which produces this output

Table

In my report, I have about 15 tables listed in the appendix (with roman numerals). I have been able to reset the table counter and add "A." to the table numbering. However, when I add multiple tables, the table number and name overlap in the list of tables.

Does anyone have an idea how I can use a format similar to the one that I am using right now, but where it does not overlap? (Sorry for duplicating the tables in this way, I didn't know how to show the list of tables otherwise.) Thank you in advance!

1

You could redefine \l@table:

\makeatletter
  \renewcommand*\l@table{\@dottedtocline{1}{1.5em}{3em}}
\makeatother

The first length (default: 1.5em) is the indentation of the table entry and the second length is the horizontal space for the table number (default: 2.3em). So you have to adjust the third argument of \@dottedtocline for \l@table.

enter image description here

Alternatively you could use a package like tocbasic, tocloft etc.

Package tocbasic can calculate the horizontal space needed for the numbers:

\usepackage{tocbasic}
\DeclareTOCStyleEntry[dynnumwidth]{tocline}{table}

But note that this calculation needs an additional run.

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.