I want to reference a subfigure, but I found the index referencing is one off if the caption is above the big figure. MWE:
\documentclass[12pt,a4paper]{scrartcl}
\usepackage{subfig}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\begin{figure}%
\centering
\caption{Example of powerset transformation}%
\label{fig:powerset_ex}
\subfloat[NFA] {
\label{subfig:powerset_nfa}
Some NFA%
}
~ $\rightarrow$ ~
\subfloat[DFA] {
\label{subfig:powerset_dfa}
Some DFA%
}
\end{figure}
In \Cref{fig:powerset_ex} we turn the NFA \Cref{subfig:powerset_nfa} into the DFA \Cref{subfig:powerset_dfa}
\end{document}
This results in the output:
In Figure 1 we turn the NFA Figure 2a into the DFA 2b.
when it should read 1a and 1b, respectively. I found that the labels are referenced correctly if I move the caption and label of the whole figure below both subfigures. But I want the figure caption above. How can I achieve this?

align=ccome from? I only know of thevalign=coption that is available when using\usepackage[export]{adjustbox}. – leandriis Mar 30 '20 at 13:12subcaptioninstead ofsubfig, see https://tex.stackexchange.com/a/64618/ for a related discussion. – Marijn Mar 30 '20 at 13:16subcaption. – PattuX Mar 30 '20 at 16:34