So I have my figures labeled as "Figure section.figurenumber", meaning each caption starts with, say, "Figure 1.1", "Figure 1.2", and "Figure 2.1" if in sections 1 and 2, respectively. I've accomplished this by putting the following in my preamble:
\renewcommand{\thesubfigure}{Figure \arabic{section}.\arabic{subfigure}}
The reason I'm using subfigures is to be able to have figures side-by-side on a page. Anyway, when I reference these figures in the actual text, like, "please see figures \ref{label1} and \ref{label2}," the actual output is "please see figures Figure 1.1 and Figure 1.2".
How can I maintain the word "Figure" in my caption but suppress it when referencing the figure in the text?
Here is a minimal working example:
\documentclass{article}
\usepackage{graphicx, caption}
\usepackage{float} %Needed for the [H] after \begin{figure}. [H] stands for "Here",
i.e., the figures appear in the PDF in the same location as in the TeX code.
\usepackage[labelformat=simple]{subcaption}
\renewcommand{\thesubfigure}{Figure \arabic{section}.\arabic{subfigure}}
\begin{document}
\section{First section}
\section{Second section}
\begin{figure}[H]
\centering
\begin{subfigure}[t]{.45\textwidth}
\begin{center} \includegraphics[scale=0.2]{stars.jpeg} \end{center}
\caption{A picture of the past.}
\label{fig:stars}
\end{subfigure}
~~~
\begin{subfigure}[t]{.45\textwidth}
\begin{center} \includegraphics[scale=0.2]{monkeys.jpeg} \end{center}
\caption{Humans not too long ago.}
\label{fig:primates}
\end{subfigure}
~~~
\begin{subfigure}[t]{.42\textwidth}
\begin{center} \includegraphics[scale=0.16]{lion.jpeg} \end{center}
\caption{Not today Satan.}
\label{fig:predator}
\end{subfigure}
~~~
\begin{subfigure}[t]{.42\textwidth}
\begin{center} \includegraphics[scale=0.16]{blueberry.jpeg} \end{center}
\caption{Is this a blueberry-topped cupcake, or just a cup of blueberries?.}
\label{fig:enigma}
\end{subfigure}
~~~
\end{figure}
As we can see in figures \subref{fig:stars} and \subref{fig:enigma}, I'm not very good at making a minimal working example.
\end{document}
And this gives the output:
thexxx
command should never feature the name of the float they refer to.\caption
should do this ... for more, you should provide MWE.