The appendix word disappears from the table of contents when using \include

by user   Last Updated October 19, 2019 22:23 PM

If you compile the following minimal example which uses the abntex2 class, which is just a wrapper around memoir class:

\documentclass[
12pt,
]{abntex2}

\begin{filecontents*}{beauty.tex}
\chapter{Some first}
Content.
\end{filecontents*}

\begin{filecontents*}{appendix.tex}
\chapter{Other second}
Stuff.
\end{filecontents*}

\begin{document}
    \tableofcontents
    \include{beauty}
    % \chapter{Fixer}

    \begin{apendicesenv}
        \include{appendix}
    \end{apendicesenv}
\end{document}

You get this:

enter image description here

But if you uncomment the line % \chapter{Fixer}, then, the document is generated correctly, i.e., with the Appendix word on the right place:

enter image description here

How can I fix this behavior and keep the Appendix word always showing up in the table of contents regardless the contents of my file?


Related questions

  1. Keep "Appendix #" in the appendix title, but remove the appendix from the table of contents
  2. Word "Appendix" in ToC with memoir class


Related Questions


Updated October 20, 2019 02:23 AM

Updated February 19, 2017 03:23 AM

Updated September 07, 2016 08:09 AM