Page Layout ⇒ Contents without appendix
Contents without appendix
I was just wondering how you could make the table of contents not show appendices?
Thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Posts: 87
- Joined: Tue Sep 14, 2010 6:58 pm
Re: Contents without appendix
Contents without appendix
I am using article but am not sure what an MWE is?west.logan wrote:Do you have a MWE? What class are you using?
-
- Posts: 87
- Joined: Tue Sep 14, 2010 6:58 pm
Re: Contents without appendix
Welcome to the forum!
Contents without appendix
Code: Select all
\documentclass[a4paper,12pt]{article}
\begin{document}
\tableofcontents
\section{Section 1}
.....
\appendix
\section{Appendix A}
\end{document}
Thanks
-
- Posts: 87
- Joined: Tue Sep 14, 2010 6:58 pm
Contents without appendix
Code: Select all
\section*{First Appendix}
If you need the automatic numbering, I'd suggest just changing it with something like:
Code: Select all
\documentclass[a4paper,12pt]{article}
%command to remove appendix from ToC
\renewcommand{\appendix}{%
\setcounter{section}{0}
\renewcommand{\section}[1]{%
\addtocounter{section}{1}\vspace{1em}\par\noindent\bfseries\Large Appendix \Alph{section}: ##1%
\vspace{1em}\par\noindent\normalfont\normalsize}%
}
\begin{document}
\tableofcontents
\section{First Section}
This is some text.
\section{Second Section}
This is some more text.
\appendix
\section{First Appendix}
This is some text.
\section{Second Appendix}
This is some more text
\end{document}