1

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.

0 Answers0