# Get rid of double appendix

Good morning

\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

% 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.

• Do you really need \include? Try replacing it with \input. – egreg Nov 27 '17 at 8:40
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.