1

I'm using \usepackage[title,titletoc]{appendix} and putting my appendices in the appendices environment. I'm trying to remove the appendix page numbers from the TOC.

I've looked at the documentation for the appendix packaged and tried using \noappendicestocpagenum without success.

\documentclass{article}
\usepackage[title,titletoc]{appendix}
\usepackage{lipsum}

\begin{document}

    \tableofcontents
    \clearpage
    \section{first}
    \section{second}
    \pagebreak
    \begin{appendices}

        \section{additional material}
        \setcounter{page}{1}
        \renewcommand{\thepage}{\thesection -\arabic{page}}

        \lipsum

        \pagebreak
        \section{more of it}
        \setcounter{page}{1}
        \renewcommand{\thepage}{\thesection -\arabic{page}}

        \lipsum

    \end{appendices}
\end{document}

Page Numbers to be removed

Advice on better formatting of my page numbers would also be welcome.

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – adn Apr 15 '15 at 19:21
  • The linked solution does not answer my question as I do not wish to suppress the appendix section numbers, only the page numbers in the TOC. Additionally, this solution does not use the appendix package, which I am using. – D Bernard Apr 16 '15 at 16:17
  • Use tex.stackexchange.com/a/66437/7561. Add the package tocloft and after appendices environment do \addtocontents{toc}{\cftpagenumbersoff{section}}. – adn Apr 16 '15 at 17:21
0

Use this solution. Add the package tocloft and after appendices environment do \addtocontents{toc}{\cftpagenumbersoff{section}}

Your code will be reworked as

\documentclass{article}
\usepackage[title,titletoc]{appendix}
\usepackage{tocloft}
\usepackage{lipsum}

\begin{document}

  \tableofcontents
  \clearpage
  \section{first}
  \section{second}
  \pagebreak
  \begin{appendices}
    \addtocontents{toc}{\cftpagenumbersoff{section}}
    \section{additional material}
    \setcounter{page}{1}
    \renewcommand{\thepage}{\thesection -\arabic{page}}

    \lipsum

    \pagebreak
    \section{more of it}
    \setcounter{page}{1}
    \renewcommand{\thepage}{\thesection -\arabic{page}}

    \lipsum

  \end{appendices}
\end{document}

enter image description here

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.