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?
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?
Here's an option that works with hyperref
:
\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.
How about changing the fonts to, say, Palatino
with the option [osf]
(oldstyle figures)?
\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}