1

I am using document class report. To ensure the word "appendix" appears in my table of contents, I have used the following:

  \usepackage[title,titletoc,toc, page]{appendix}

and

  \begin{appendices}
  \include{SomeAp1}
  \clearpage
  \include{SomeAp2} 
  \end{appendices}

This adds the word appendix to my table of contents. However, it also creates a extra page with the heading "Appendices" right before the first appendix. Therefore, instead of showing something like the following in TOC:

Appendices page 11 Appendix A page 11 Appendix B page 17

I get

Appendices page 10 Appendix A page 11 Appendix B page 17

ADDED:

\documentclass{report}

 \usepackage{comment} 
 \usepackage{amssymb} 
 \usepackage{xspace}
 \usepackage{graphicx}
 \usepackage{amsmath}
 \usepackage{enumerate}
 \usepackage{amssymb}
 \usepackage{multirow}

 \usepackage[letterpaper,left=1in,right=1in,top=1in,bottom=1in]{geometry}
 \usepackage{tocbibind}
 \usepackage[title,titletoc,toc,page]{appendix}
 \usepackage[doublespacing]{setspace}


 \usepackage{hyperref}
 \hypersetup{
      colorlinks,
      citecolor=black,
      filecolor=black,
      linkcolor=black,
      urlcolor=black}

  \setcounter{secnumdepth}{3}

  \begin{document}
   \pagenumbering{roman} 
   \setcounter{page}{2}

    \include{Abstract}
    \include{Acknowledgements}
    \tableofcontents
    \listoffigures

   \clearpage
   \pagenumbering{arabic}
   \setcounter{page}{1}

   \include{someChapter}

   \bibliographystyle{plain}               
    \bibliography{MyLib}                      


    \begin{appendices}
    \include{Ap1}
    \clearpage
    \include{Ap2} 
    \end{appendices}                     

     \end{document}

ADDED: I added

     \usepackage[toc,titletoc,title]{appendix}

instead of

     \usepackage[title,titletoc,toc, page]{appendix}

And this almost gives me the effect I want, but it has one problem. In table of contents, first Appendix A is mentioned, then appendices, then Appendix B.

Thank you in advance

  • Please post a compilable document, not just fragments – user31729 Jan 16 '18 at 18:49
  • @ChristianHupfer plz see the additions to my question. Thanks for your help – Melanie A Jan 17 '18 at 10:19
  • It seems that you did not do what I said in my answer which was not to use the toc option of the appendix package. I have edited my answer to make that clearer. – Peter Wilson Jan 17 '18 at 19:04
1

Don't use the toc option of the appendix package. As the documentation says: "[It] puts a header (e.g., Appendices) into the ToC before listing the Appendices"

As far as I can tell

\usepackage[title,titletoc,page]{appendix}

gives the result you are after.

  • Removing the toc option removes "appendices" from table of contents. I need to have that in table of contents, however, I don't want to have an extra page before the appendices. – Melanie A Jan 16 '18 at 22:18
  • Another point is that if I click the link appendices, it brings me to the page but for some reason under the appendices title, so that I don't see where I am I just have to scroll up to see the title appendices which is somewhat in the middle of the page – Melanie A Jan 17 '18 at 0:16
  • ADDED: I added \usepackage[toc,titletoc,title]{appendix} instead of \usepackage[title,titletoc,toc, page]{appendix} And this almost gives me the effect I want, but it has one problem. In table of contents, first Appendix A is mentioned, then appendices, then Appendix B. – Melanie A Jan 17 '18 at 10:15
0

You first need to remove the page option to the appendix package. You are then left with the problem described in the documentation of the appendix package in "2.1 Known problems": the table of contents code generated by \begin{appendices} interacts badly with following \include command, resulting in an incorrect ordering in the table of contents.

A workaround is to replace the first \include{SomeAp1} after \begin{appendices} by \input{SomeAp1}:

Sample output

\documentclass{report}

\usepackage{tocbibind}
\usepackage[toc,titletoc,title]{appendix}

\begin{document}
\pagenumbering{roman}
\setcounter{page}{2}

\tableofcontents

\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}

\chapter{Some Chapter}

\begin{appendices}
  \input{Ap1}
\include{Ap2}
\end{appendices}

\end{document}

where Ap1.tex is

\chapter{Appendix 1}

Text.

and Ap2.tex is

\chapter{Appendix 2}

Text.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.