I want to configure \cref
to write "Appendix A" instead of misleading "Chapter A".
Minimum Working Example (MWE):
\documentclass{scrbook}
\usepackage[toc,page]{appendix}
\usepackage{cleveref}
\begin{document}
\tableofcontents
\chapter{Regular Chapter}
This is a test, represented in \cref{appendix:Test}.
\begin{appendices}
\chapter{Test Appendix}
The contents...\label{appendix:Test}
\end{appendices}
\end{document}
Screenshot of the result:
The code above will create the following page:
Description of the issue:
The problem now is: A potential reader won't understand that "Chapter A" is a part of the appendix. Therefore I would prefer to write something like "Appendix A" in the text.
How can I configure \cref
to write "Appendix A" instead of misleading "Chapter A" when labelling the target appendix with \label{appendix:Random test appendix}
?
\cref
does such a great job for figures and tables, why not for appendices? In best case (like it already does for figures and tables), it should automatically detect if the \cref
is placed at the beginning of a sentence (= "Appendix A") or in the middle/end of a sentence (= "appendix A")…
How to configure that? 馃檪
Best Answer
You can use
\label[appendix]{...}
for each chapter label in the appendix or you can set\crefalias{chapter}{appendix}
in theappendices
environment.Result:
Complex example:
Result:
If the appendix is not followed by "normal" chapters you can use the switch
\appendix
:or without package
appendices
:If the TOC entry for the appendices page should have the same style as chapter entries use: