8

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?

2

2 Answers 2

5

Here's an option that works with hyperref:

enter image description here

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

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.

4

How about changing the fonts to, say, Palatino with the option [osf] (oldstyle figures)?

enter image description here

\documentclass[english,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[osf]{mathpazo} % changes font to Palatino

\begin{document}

\begin{figure}
  % <codes>
  \caption{Some figure}
  \label{fig:1}
\end{figure}

This is Figure \ref{fig:1}.

\end{document}

You must log in to answer this question.

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