From what I understand, in order to refer to a figure in the text and be able to access it via clicking, I use \label{}
, and then in the text I use \ref{}
, with the same name inside.
What I would like is for the figure to not have the caption appear, but to keep the numbering. So that in the text, there is still "1" that I can click to jump to the figure, but for there not to be "Figure 1" or "Figure 1: etc". If I try including \caption*{}
(as I've seen on other answers), the numbering goes away and is replaced with "??" which is not what I want (although it still goes the picture when I click it).
I think getting rid of the caption
package and associated uses of \caption{}
would do the trick normally, but within the same document later on, I am planning on cross-referencing to figures in a document that uses the captions and the caption
package quite heavily, so I figure I need to be able to have the caption
package here.
Example code below:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\section{Introduction}
Let's test this \ref{Fig:test}
\begin{figure}
\centering
\includegraphics[width=\textwidth]{example-image-a}
\caption{}
\label{Fig:test}
\end{figure}
\end{document}
Any help would be appreciated.