I'm writing a text using the documentclass report
and I can't find a way to add appendices like this within the article
class:
\documentclass{article}
\begin{document}
\tableofcontents
\section{First section}
\subsection{A subsection}
\appendix
\addcontentsline{toc}{section}{Appendices}
\section*{Appendices}
\section{First appendix}
\section{Second appendix}
\end{document}
What I would like is:
- A main section (not a chapter, except if it's too complicated to do) named : Appendices without any numbering here
- subsection for every new appendices, with numbering (or letters)
Like this:
Last chapter
Last section
Last subsection
Appendices (as a section*) \addcontentsline{toc}{section}{Appendices}
Appendix 1 (as a subsection) \addcontentsline{toc}{subsection}{Appendix 1}
Appendix 2 (as a subsection) \addcontentsline{toc}{subsection}{Appendix 2}
Appendix 3 (as a subsection) \addcontentsline{toc}{subsection}{Appendix 3}
I would also like to refer to the appendices (with a \label{stuff}
) in the main text regarding their number (or letter, I don't really care here).
Every try I've done ended with strange numbering begin either with a dot like this .1
or with .0.1
. Thanks.
Update: This is almost working:
\documentclass{article}
\begin{document}
\tableofcontents
\section{First section}
\subsection{A subsection}
\appendix
\addcontentsline{toc}{section}{Appendices}
\section*{Appendices}
\renewcommand{\thesubsection}{\Alph{subsection}}
\section{First appendix}
\section{Second appendix}
\end{document}
But placing the letter in front of the Appendix name and I can't place it as the end. It would be great.