# Reference to chapters/sections in appendix with “Appendix” name with cleveref

I'm using a custom chapter for my appendix :

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

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


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

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}