I wish to reference-call my sections in the style "(curly-S)2.1". Looking at the documentation, Section 8.2.1, I can achieve this as \Crefformat{section}{\S#2#1#3}
. However, this doesn't work when the section is an appendix. There are lots of questions on cleveref+appendix, but I haven't been able to find a solution in them.
I can, of course, simply use \renewcommand{\thesection}{\Alph{section}}
and reset the counter. It feels like there should be a much better way...
Currently everything is set up as default for article
.
The following is a simple MWE.
\documentclass[]{article}
\usepackage{cleveref}
\Crefformat{section}{\S#2#1#3}
\begin{document}
\section{Main Section}
\label{main}
\appendix
\section{Appendix Section}
\label{app}
\Cref{main}
\Cref{app}
\end{document}
1 [title]
,2 [title]
, ...A [title]
,B [title]
? Do you prefix the\S
symbol to the section-level headers? ? Which document class do you employ? Please be specific. – Mico Jul 25 at 16:31\Crefformat{...}{...}
that I describe. I actually solved it anyway with a guess! (and answered below) – Sam T Jul 25 at 20:57