I use hyperref for referencing all my figures and it works great for everything except figures tikzpicture. For figures containing a graphic, the reference outputs Figure N. for tikz, it outputs section N of the nearest parent section.
Here is my sample code given:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{hyperref}
\begin{document}
\section{my-section}
\begin{figure}
\centering
\begin{tikzpicture}
\node(n) {$n$};
\end{tikzpicture}
\label{my-label}
\caption{my caption}
\end{figure}
aa \autoref{my-label} bb
\end{document}
It outputs aa section 1 bb. My desired output is aa Figure 1 bb.
\labelafter the\caption. – Jérôme Dequeker Jan 24 '17 at 10:23\caption{my caption\label{my-label}}– Ignasi Jan 24 '17 at 10:24