# Use package cleveref in Chapters

\documentclass[a4paper,12pt]{report}
%------------------------------------------------------------
\usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}
%-----accent
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\newtheorem{corollary}{Corollary}[section]

\begin{document}
\chapter{Preliminary}
....The crucial idea of the proof is to make use ..... (see \cref{fekete} in \cref{app}).

\chapter*{Appendix}\label{app}
\begin{corollary}\label{fekete}

\end{corollary}
\end{document}


I want to obtain

• You never heard of \appendix? – Johannes_B Feb 17 at 6:46
• I don't understand your question. – Schüler Feb 17 at 6:47
• Add \appendix before \chapter*{Apendix} and compile ... – Mensch Feb 17 at 6:50
• @Schüler -- The problem "persists" because your document setup has a fundamental flaw. If there's a single unnumbered appendix chapter, it's overkill to adduce the cleveref machinery to create a cross-referencing call-out. You could (actually, should) write "... according to corollary X in the appendix". In my view, though, it does make sense to number the appendix chapters, even if there's just one chapter of this type. What you would have to do -- in addition to inserting that loathsome \appendix instruction -- is change \chapter*{Appendix} to \chapter{Supplemental Material}. – Mico Feb 17 at 8:00
• Thank you. So I think I write simply "... according to corollary X in the appendix". – Schüler Feb 17 at 8:05

You need to add \appendix before your line \chapter*{Appendix} and delete the * to get a numbered appendix. Then cleveref can work.

\documentclass[a4paper,12pt]{report}

%\usepackage{amssymb,amsmath,amsthm,latexsym,mathrsfs,amsfonts,dsfont}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{xcolor}

\newtheorem{corollary}{Corollary}[section]

\begin{document}

\tableofcontents

\chapter{Preliminary}
The crucial idea of the proof is to make use ..... (see \cref{cor:fekete} in \cref{cha:app}).

\appendix
\chapter{Supplemental material}\label{cha:app} % <=======================================
\begin{corollary}\label{cor:fekete}

\end{corollary}

\end{document}


and its result:

and page 3:

with better chapter heading and no double Apendix :-)

• Thank you but after compilation, I find Appendix A Appendix Corollary A.0.1. I hope to find only Appendix without A. – Schüler Feb 17 at 7:05
• Please after compilation, see page 3. Thanks a lot. – Schüler Feb 17 at 7:39
• @Schüler - If you want to have a numbered appendix, you must switch from \chapter*{...} to \chapter{...}. If you do not want to number the appendix, there's simply no point in using the \cref machinery to create a cross-referencing call-out; instead, just write "in the appendix". – Mico Feb 17 at 7:47
• Thank you but, is there another idea instead \appendix? – Schüler Feb 17 at 7:52
• @Schüler \appendix is born for that purpose, i.e. this is the standard solution. – user156344 Feb 17 at 8:01