I'm using ShareLatex and I'm trying to add a cross reference of a figure, but the result of the \ref{fig:sampe} only displays the number of the image and does not follow the format 'Figure 1' for example. I've tried with figure and subfigures and the result is the same.
Currently I'm using the following packages:
\usepackage{caption}
\usepackage{subcaption}
\usepackage{cleveref}
And also added the following lines:
\captionsetup[subfigure]{subrefformat=simple,labelformat=simple}
\renewcommand\thesubfigure{(\alph{subfigure})}
Does anyone knows why is this happening?
I've already checked the following posts this and this. Thanks in advance.
EDIT: I've added compilable code.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\captionsetup[subfigure]{subrefformat=simple,labelformat=simple}
\renewcommand{\figurename}{Figura}
\renewcommand\thesubfigure{(\alph{subfigure})}
\usepackage[
backend=biber,
sorting=none,
urldate=edtf,
date=edtf,
seconds=true
]{biblatex}
\usepackage{url}
\usepackage{float}
\begin{document}
Some text, here it would have to appear the first reference \cref{fig:test1} , here it would have to appear the seconds reference \cref{fig:nav01_welcome}.
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.5\textwidth]{./images/navigation/nav01_welcome.png}
\caption{Pantalla de bienvenida}
\label{fig:test1}
\end{center}
\end{figure}
\begin{figure}
\centering
\begin{subfigure}[h]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{./images/navigation/nav01_welcome.png}
\caption{Arabic numerals}\label{fig:1a}
\label{fig:nav01_welcome}
\end{subfigure}
\quad
\begin{subfigure}[h]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{./images/navigation/nav02_welcome.png}
\caption{Arabic numerals}\label{fig:1b}
\end{subfigure}
\caption{Capital Roman numerals}\label{fig:1}
\end{figure}
\end{document}

\cref{<key>}? Welcome to TeX.SE! – Troy May 13 '17 at 15:25\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Heiko Oberdiek May 13 '17 at 15:51documentclassline. You claimed to load packagecleverefbut the example doesn't show that either. – Johannes_B May 14 '17 at 08:21./images/navigation/nav02_welcome.pngdoesn't work for anyone other than you. It would be better if you useexample-image(which is in tex distributions for this reason) and check that the issue still occurs with the example in that form. Or since your question is not about the image, replace\includegraphicsbyIMAGE HEREor anything else. – David Carlisle May 14 '17 at 08:41\ref{label}is supposed to only output the number. On the other hand,\cref{label}adds the kind of counter you are referring to. And you already use that. What exactly is your question? – Johannes_B May 14 '17 at 08:44