1

Good morning

There are already some threads about this. None of those really helped. I have main file like this:

\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Sections and Chapters}
\author{Testy McTesty}
\date{ }

\usepackage[titletoc,toc,title,page]{appendix}
\renewcommand{\appendixpagename}{\appendixname} 
\renewcommand{\appendixtocname}{\appendixname} 

\begin{document}
       \maketitle
    \tableofcontents
    \section{Introduction}
    This is the first section.
        % Appendix
    \include{appendix}
\end{document}

And and appendix looking like this:

% Appendix

%\appendix       by the way, I have no clue what this was for...
\appendixpage
\noappendicestocpagenum
\addappheadtotoc

% List of figures
\cleardoublepage
{
    \listoffigures
}
% List of tables
\cleardoublepage
{
    \listoftables
}

% Bibliography
\cleardoublepage

If I run it like this I always get two appendix entries in the ToC. What's the source of this problem? In addition I'm wondering what \appendix used to do. I commented it out because it doesn't really changed anything.

Thanks for your advice!

1
  • Do you really need \include? Try replacing it with \input.
    – egreg
    Nov 27, 2017 at 8:40

1 Answer 1

1

Just remove the call of \addappheadtotoc from the appendix.tex file which is included with \include{appendix}.

By saying \usepackage[titletoc,toc,title,page]{appendix} the appendix title page is already included in the ToC, which is pretty obvious from the toc option ;-)

In my opinion this is a 'bug' of the appendix package -- it does not check whether the package option toc is already specified when \appappheadtotoc is called.

enter image description here

0

You must log in to answer this question.

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