I am writing a document where each chapter has an appendix. In addition to the appendices I would like to have a final supplementary files section where I list all the files that accompany the document each in their own section.
I am using both the appendix
and cleveref
packages.
Essentially when I refer to an appendix I would like the in-text reference to say "Appendix X" except when referring to the final appendix where it should say "Supplement X.X".
In addition since appendices are labeled alphabetically I would like to set the appendix counter forward to 19 so that the supplementary files section is section "S".
Here is a MWE:
\documentclass{report}
\usepackage[toc,page,titletoc]{appendix}
\usepackage[capitalise,nameinlink]{cleveref}
\begin{document}
TITLE
\tableofcontents
\chapter{Test Chapter 1}
Here is an idea (\cref{app:ch1}). The raw data is available in \cref{app:supp1}.
\chapter{Test Chapter 2}
Another idea.
\appendix
\chapter{Test Chapter 1}
\label{app:ch1}
\chapter{Test Chapter 2}
\label{app:ch2}
\crefalias{sectiom}{supp}
\chapter{Supplementary material}
\section{Supplementary material of chapter 1}
\label{app:supp1}
\section{Supplementary material of chapter 2}
\label{app:supp2}
\end{document}
Best Answer
Using the
appendices
environment you can control things a little more finely:Table of contents:
Text reference:
Supplementary material:
The ingredients are as follows:
appendices
environment with options controlled by the option passed to theappendix
packageappendices
environment, where the extra page and heading are turned off, the toc name is adjusted, the chapter counter is set to19
(corresponding to "S"), the chapter title is provide by\chapter*
and the section counter is aliased tosupp
\crefname
instruction to print references to thesupp
counter with the nameSupplement