1

I'm using a custom chapter for my appendix :

\newcommand{\nnchapter}[1]
{
    \chapter*{#1\markboth{#1}}
}

\newcommand{\nntocchapter}[1]
{
    \chapter*{#1\markboth{#1}}
    \addtocontents{ptc}{\begingroup\string\makeatletter\string\c@tocdepth -3\relax}
    \addcontentsline{toc}{chapter}{#1}
    \addtocontents{ptc}{\endgroup}
}

I have this code for my appendix :

\nnchapter{Appendix A}
\renewcommand{\thechapter}{A}
\section{first section} \label{first_section}

However, when I'm referencing the section in the text with \cref{first_section}, the resulting link contains "Section A.1". I would like to have "Appendix A.1".

How can I do this ? I tried to renew the following commands but it's not working.

\renewcommand{\appendixname}{Appendix}
\renewcommand{\appendixtocname}{Appendix}
\renewcommand{\appendixpagename}{Appendix} 

Thanks for all !

  • Please tell us which document class you employ. – Mico May 29 '18 at 13:18
1

A way to make it work:

\usepackage[toc,page]{appendix}

\chapter{My chapter}
\section{My section}
A reference to \cref{first} %% create a link on "Appendix A.1"

\appendix

\nnchapter{appendix title}
\renewcommand{\thechapter}{A}
\section{my fisrt section} \label{first}

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.