Let's say I have this:
\documentclass{article}
\usepackage{cleveref}
\begin{document}
\section{Section One}
\label{a:sec1}
\cref{a:sec1}
\section{Section Two}
\label{b:sec2}
\cref{b:sec2}
\end{document}
Cleveref will now reference "Section 1" and "Section 2" because the label comes after a section. But what I need is that it references the label depending on a:
and b:
, where I define the displayed name. For example: All labels having an a:
should be referenced as "Car X" and all labels having a b:
should be referenced as "Truck X" even though they are both a section.
Note: I do not want to change the counter, only the word that is displayed when referencing depending on the label's "namespace"!
Is cleveref
able to do this alone or do I have to build some custom solution (probably with prettyref
)?
\carsection
and\trucksection
instead. That's of course solvable as well, and I would consider it more standard.