I am using a label for referencing. I just added my table of contents and saw the label is used as chaptertitle. How could I fix this?
My MWE:
\documentclass[a4paper,dutch]{report}
\let\orichaptermark\chaptermark
\renewcommand\chaptermark[1]{\label{chap:#1}\orichaptermark{#1}}
\begin{document}
\tableofcontents
\chapter[label]{Chapter name}
\end{document}
Best Answer
While it's possible to make label names with chapter names it's better to refrain from this procedure.
The optional argument of
\chapter
is reserved (in standard LaTeX document classes) for the short entry to the table of content (and page headers), especially useful for long chapter names.The
\cref
command inserts the correct reference name (chapter), if thecleveref
package is loaded. (Load it as last one, even afterhyperref
)