I am creating a document with multiple chapters, which each have a set of appendices, and a table of contents that includes a list of tables and figures. The numbering for the tables in the chapter sections and appendices are inconsistent and I would like to add a prefix to the appendix tables that shows up in the list of tables. For example:

\documentclass[11pt,openright,oneside,letterpaper,onecolumn]{report}
\usepackage[toc,page]{appendix}

\begin{document}

\setcounter{tocdepth}{2}
\tableofcontents
\cleardoublepage

\listoffigures
\cleardoublepage

\listoftables
\cleardoublepage

\clearpage
\chapter{Section 1}

\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 1}
\label{Label of table}
\end{table}

\begin{appendices}
\renewcommand{\thesection}{1.\arabic{section}}
\clearpage

\section{Appendix 1}
\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 2}
\label{Label of table}
\end{table}

\section{Appendix 2}
\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 2}
\label{Label of table}
\end{table}
\end{appendices}

\chapter{Section 2}

\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 1}
\label{Label of table}
\end{table}

\begin{appendices}
\renewcommand{\thesection}{1.\arabic{section}}
\clearpage

\section{Appendix 1}
\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 2}
\label{Label of table}
\end{table}

\end{appendices}

\end{document}


In this code, the list of tables for the first three are 1.1, 2, 3 and for the second set they are 2.1, 2. I would like to add the prefix "1." to the appendix table listing for the first three and "2." to the second such that the string is 1.1, 1.2, 1.3, 2.1, 2.2. Any ideas on how to do this?

• Well, the appendices environment is usually not meant to be used more than once. Are you looking rather for subappendices? (by the way, the labels of the table are all the same and have spaces in them ... ) – user31729 Apr 1 '16 at 18:20

Do you mean this?

\documentclass[11pt,openright,oneside,letterpaper,onecolumn]{report}
\usepackage[toc,page]{appendix}

\begin{document}

\setcounter{tocdepth}{2}
\tableofcontents
\cleardoublepage

\listoffigures
\cleardoublepage

\listoftables
\cleardoublepage

\clearpage
\chapter{Section 1}

\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 1}
\label{Labeloftable}
\end{table}

\begin{subappendices}

\section{Appendix 1}
\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 2}
\label{Labeloftable2}
\end{table}

\section{Appendix 2}
\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 2}
\label{Labeloftable3}
\end{table}
\end{subappendices}

\chapter{Section 2}

\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 1}
\label{Labeloftable4}
\end{table}

\begin{subappendices}

\section{Appendix 1}
\begin{table}
\begin{tabular}{|c|c|}
\hline 1 & 2 \\
\end{tabular}
\caption{Tab 2}
\label{Labeloftable5}
\end{table}

\end{subappendices}

\end{document}


• @coding_heart: You're welcome – user31729 Apr 1 '16 at 18:57