The reference to my sub caption doesn't work
\documentclass{article}
\usepackage{mwe}
\usepackage{subcaption}
\usepackage{cleveref}
\begin{document}
\section{Section}
\begin{center}
\captionsetup{type=figure}
\begin{subfigure}{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-a.pdf}
\caption*{Text 0}
\end{subfigure}
\begin{subfigure}{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-b.pdf}
\caption*{Text 1\label{here}}
\end{subfigure}
\captionof{figure}{Description}
\end{center}
Look at \Cref{here}.
\end{document}
Maybe also see here
UPDATE:
It should produce Look at Text 1
Actually it's always the same text, so I would really like a solution where my counter is 0,1, ...
at the and of the caption.
Or (maybe to use with \caption{\empty}
where my counter is Text 0, Text 1, ...
Best Answer
Since counters are reset to zero, you can't use
\refstepcounter
to set up the\label
. OTOH, you need\refstepcounter
for cleverref and hyperref. So I generate the label before\refstepcounter
then reset\@currentlabel
after.I see that
\subcaption
defines skip=6pt, but I can't figure out where skip is used. Also,\caption
somehow knows whether it is at the top or bottom. I had to set up\mycaption
for bottom only.