[Tex/LaTex] How to change font size of \ref


How can I change the fontsize of a reference mark? My reference is something like:

this is a text \ref{figure1}

When compiled I get

this is a text 1

The "1" is in normal font size. How can I change the look of "1" to a smaller font size?

Best Answer

Here's an option that works with hyperref:

enter image description here

\usepackage{hyperref,letltxmacro}% http://ctan.org/pkg/{hyperref,letltxmacro}
\newcommand{\reffont}{\small}% References will be \small
  \LetLtxMacro\oldref\ref% Capture \ref in \oldref
  \renewcommand{\ref}[1]{% Update \ref to use...
  {\reffont\oldref{#1}}}% ...\reffont
  \caption{This is a figure}\label{figure}
See Figure~\ref{figure}.

If hyperref is used, reference updating is (should be) delayed until the beginning of the document. If not, then a redefinition can be done earlier.

You can redefine \reffont at will to obtain a different font size (or style) of your reference.

Related Question