0

How can one make LaTeX insert Figure into \ref calls automatically, i.e. instead of writing:

See data in Figure \ref{fig:JobInformationDialog}

simply write:

See data in \ref{fig:jobInformationDialog}

and have LaTeX insert Figure [fignum] when it gets compiled?

1
  • Package cleveref might be of interest here.
    – cjorssen
    Commented May 13, 2014 at 14:51

1 Answer 1

3

You can use the \autoref command from the hyperref package. If you want to change the Figure part of the reference you

\documentclass{article}
\usepackage{hyperref}

\begin{document}

See data in Figure \ref{fig:JobInformationDialog}

See data in \autoref{fig:JobInformationDialog}

\begin{figure}
    \centering
    \fbox{JobInformationDialog}
    \caption{The Caption}
    \label{fig:JobInformationDialog}
\end{figure}

\end{document}

If you want to change the Figure part of the reference you can redefine \figureautorefname

\renewcommand{\figureautorefname}{Illustration}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .