0

I am creating my own Appendix numbering in a document, and the number isn't appearing correctly in the ToC. In appendixa.tex, I have:

\renewcommand\thesection{Appendix \Alph{section}}

\section{}
\label{s:appa}

This creates a new section called "Appendix A", and any references in the document appear as "Appendix A". My issue is, in the ToC, it appears as "Appendix.A". Is there any simple way to change this so it appears as "Appendix A" in the ToC?

****EDIT****

This is my main document, report.tex:

\documentclass[11pt,letterpaper]{report}

\renewcommand{\bibname}{References}

\begin{document}

\maketitle
\clearpage
\thispagestyle{empty}
\pagenumbering{roman}
\tableofcontents
\clearpage

%% =========

\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\counterwithout{section}{chapter}

%% =========

\input intro
\setcounter{section}{1}

%% intro.tex is a separate file with only a section, and there are more
%% \input lines after this. They all appear in the documents and ToC
%% correctly. Each is simply a section. This can be commented out.

\afterpage{\clearpage}

\bibliographystyle{unsrt}
%% =========
\bibliography{}
\addcontentsline{toc}{section}{References}

\newpage
\setcounter{section}{0}

\input appendixa

\newpage
\endpage

\end{document}

My entire appendixa.tex file is above.

6
  • 1
    Hi! Could you provide us with a compilable document to reproduce the error? (Something we can copy paste.)
    – 1010011010
    Commented Aug 13, 2015 at 19:57
  • 1
    @Zach You can edit your question. But your sample won't really help as it is, since you are using \input. But this shouldn't be necessary for showing the problem. (and you have some extra stuff that's not relevant either) Just use some dummy text instead.
    – Alan Munn
    Commented Aug 13, 2015 at 20:13
  • Your code is quite strange, i recommend reading LaTeX for complete novices. :-)
    – Johannes_B
    Commented Aug 13, 2015 at 20:24
  • On a different and off topic matter: Is your audience used to documents with appendices? The mere change of numbering is usually enough for the reader to say Oh, something happened, this is the appendix This is especially the case, when the document had a nice conclusion or summary right before it ;-)
    – Johannes_B
    Commented Aug 13, 2015 at 20:26
  • Yes, they are. My issue is just how it appears in the ToC. I do not want it to say "A (Name)", I want it to say "Appendix A". Right now it appears as "Appendix.A". I'm just attempting to replace the "." with a space.
    – Zach
    Commented Aug 13, 2015 at 20:31

1 Answer 1

2

The main problem here is that the O.P. does not use the \appendix command at all and confuses chapter and section throughout the whole document.

Now redefinition of \thesection as {Appendix \Alph{section}} will lead to a very wide section number -- too wide for the ToC number region -- it leaks into the dotted section line, that is why a dot . appears there.

If the class is book or report → the main appendix unit is \chapter, if the class is article the appendix unit is section.

Mixing it is not recommended (as well as not giving a title -- from a typographical/informational point of view)

I changed some settings and used appendix package with the title,titletoc options. This will automatically provide the Appendix ... entry in the title as well as in the ToC

For the bibliography inclusion in ToC I used tocbibind

\documentclass[11pt,letterpaper]{report}

\renewcommand{\bibname}{References}


\usepackage[nottoc]{tocbibind}
\usepackage[titletoc,title]{appendix}
\usepackage{blindtext}
\usepackage{chngcntr}
\title{Theory of Brontosaurs}
\author{Ann Elk (Misses)}

\begin{document}

\maketitle
\clearpage
\thispagestyle{empty} %%%
\pagenumbering{roman}
\tableofcontents
\clearpage

%% =========


\pagenumbering{arabic}
\setcounter{page}{1} % Useless
\counterwithout{section}{chapter}

%% =========

%\input intro
% \setcounter{section}{1}
\section{Intro}
\cite{Lam94}

%% intro.tex is a separate file with only a section, and there are more
%% \input lines after this. They all appear in the documents and ToC
%% correctly. Each is simply a section. This can be commented out.

%% =========


\bibliographystyle{unsrt}
\bibliography{biblio}




\begin{appendices}

\chapter{}\label{c:appa} 

\blindtext[5]
\end{appendices}


\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .