I am using cleverref and a custom counter to typeset a special kind of reference,
where I need the same text on the definition side and the reference side.
Currently I use \textbf{F\arabic{thefeatures}} on the definition side and
\crefformat{thefeatures}{#2\textbf{F#1}#3} to format the references.
However instead of the F<number> I'd like to switch to F<number padded by zeroes>.
While I can use the fmtcount package for the definition side
(and use the \padzeroes command with decimal output),
this doesnt work for the reference labels.
Current code:
\documentclass{article}
\usepackage{cleveref}
\newcounter{thefeatures}
\setcounter{thefeatures}{0}
\crefname{thefeatures}{feature}{features}
\newcommand{\deffeat}[1]{
\refstepcounter{thefeatures}
\label{#1}
\textbf{F\arabic{thefeatures}}
}
\crefformat{thefeatures}{#2\textbf{F#1}#3}
\begin{document}
\deffeat{test} feature test
\deffeat{test2} feature test2
\Cref{test} test ref
\end{document}