I am wondering why this command works:
\noindent\adjustimage{width=1.2\textwidth,center,caption={mycaption},label={mylabel},figure}{mylabel}
and I got references working correctly, and instead with this code I get the document compiled, but references do not work (question marks appear):
\begin{figure}
\adjustimage{width=1.2\textwidth,center}{myfigure}
\label{mylabel}
\caption{mycaption}
\end{figure}
In there any way to modify the above code in order to have references working?
I add a minimal code that allow compilation:
\documentclass[a4paper,11pt]{article}
\usepackage{adjustbox}
\usepackage{graphicx,float}
\usepackage{epstopdf}
\usepackage{caption}
\usepackage{pdflscape}
\begin{document}
In picture reference \ref{figure1} works, instead in picture \ref{figure2} does not
\noindent\adjustimage{width=1.2\textwidth,center,caption={mycaption1},label={figure1},figure}{myfigure1}
\begin{figure}[H]
\adjustimage{width=1.2\textwidth,center}{myfigure2}
\label{figure2}
\caption{mycaption2}
\end{figure}
\end{document}
\adjustimagedefined? – leandriis Oct 17 '19 at 13:53