I have rotated my figure to 90 degrees using adjustbox as follows:

      My caption

Now when I want to use this figure as reference like \ref{fig:my_figure}, I am seeing ?? as the reference. I will be thankful if anyone could help me with this.

  • 1
    The \label command must go next to the caption, either inside the argument to \caption or just before \end{minipage}. – egreg Feb 7 '15 at 16:59
  • you mean like {\caption{% My Caption} {\label{fig:my_label}}? – Sadiksha Gautam Feb 7 '15 at 17:02
  • 1
    Yes, but no additional braces around \label{fig:my_label} – egreg Feb 7 '15 at 17:03

The \label is too far from \caption; more precisely, the caption is set inside a minipage, which forms a group, so what LaTeX sets up for being remembered along with \label is forgotten at \end{minipage}.


    {\caption{My caption}\label{fig:my_figure}\end{minipage}},


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.