0

I use the LaTeX article template scifile. When I do a cross reference to a Figure, only the Figure number gets printed out.

E.g. when I do: see: \ref{fig:1} i only get see: 1 instead of see: Figure 1.

How can I fix this behaviour to print out the reference form (e.g. equation, section, figure, table etc.)?

I have tried to search for reference style management, but I found no solution for editing the cross-reference output style.

  • Maybe \autoref{} from the hyperref package is what you are looking for. – Bibi Dec 10 '15 at 15:08
  • Either autoref from hyperref or cleveref's \cref features can be used (use cleveref as last package, even after hyperref – user31729 Dec 10 '15 at 15:23
2

In a standard setup, \ref does only print the number, but not the reference type.

The package cleveref provides \cref (or \Cref) to print both the label type and the referenced value. For standard counters such as figure, table all is set up already, even language aware.

\documentclass{article}
\usepackage{cleveref}
\begin{document}
\begin{figure}
\caption{figure one}\label{figone}
\end{figure}

In \cref{figone} or in \Cref{figone}
\end{document}

enter image description here

| improve this answer | |

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.