[Tex/LaTex] Customize appendices environment to print ‘Publications’ instead of ‘Appendices’

appendicestable of contents

I want to customize \begin{appendices} command to print 'Publications'. It works in the main document, however it is still writing 'Appendices' in the table of contents.

\renewcommand\appendixname{Publications}
\renewcommand\appendixpagename{Publications}
\begin{appendices}
 \includepdf[pages=-, offset = 0 0]{\Papers\text.pdf}
\end{appendices}

How can i also change the title in contents ?

enter image description here enter image description here

Best Answer

The macro \appendixtocname is responsible for the title of the Appendix in the ToC.

It must be redefined with \renewcommand{\appendixtocname}{Yournicetitle} if it should be other than the usual \appendixname.

Please note that a change of \appendixname does not change \appendixtocname, however!

\documentclass{book}

\usepackage[toc,page]{appendix}
\usepackage{blindtext}


\usepackage{hyperref}

\renewcommand\appendixname{Publications}
\renewcommand\appendixtocname{\appendixname}
\renewcommand\appendixpagename{Publications}

\begin{document}
\tableofcontents
\blinddocument
\begin{appendices}
  \blinddocument
% \includepdf[pages=-, offset = 0 0]{\Papers\text.pdf}
\end{appendices}

\end{document}

enter image description here