cleveref
Outdated
cleveref is only partially compatible with tagged (accessible) PDFs. Use its successor zref-clever for new documents.
Cross-references that prepend the right label (Figure, Section, …) automatically and merge ranges.
- Example
- Preamble
\Cref{fig:ex:cref} shows a simple fact, although \cref{fig:ex:cref} could also show something else.
\Cref{tab:ex:cref} shows a simple fact, although \cref{tab:ex:cref} could also show something else.
\Cref{sec:ex:cref} shows a simple fact, although \cref{sec:ex:cref} could also show something else.
% Extensions for references inside the document (\cref{fig:sample}, ...)
% Enable usage \cref{...} and \Cref{...} instead of \ref: Type of reference included in the link
% That means, "Figure 5" is a full link instead of just "5".
\usepackage[capitalise,nameinlink,noabbrev]{cleveref}
% IEEE Editorial Style Manual: "Fig. 1" also at the beginning of a sentence, "Section II", "Table I";
% equations as "(1)" in the text and as "Equation (1)" at the beginning of a sentence
\crefname{figure}{Fig.}{Figs.}
\Crefname{figure}{Fig.}{Figs.}
\crefformat{equation}{#2(#1)#3}
\crefrangeformat{equation}{#3(#1)#4 to~#5(#2)#6}
\crefmultiformat{equation}{#2(#1)#3}{ and~#2(#1)#3}{, #2(#1)#3}{, and~#2(#1)#3}
\Crefformat{equation}{#2Equation~(#1)#3}
\Crefrangeformat{equation}{Equations~#3(#1)#4 to~#5(#2)#6}
\Crefmultiformat{equation}{Equations~#2(#1)#3}{ and~#2(#1)#3}{, #2(#1)#3}{, and~#2(#1)#3}
\crefname{listing}{Listing}{Listings}
\Crefname{listing}{Listing}{Listings}
\crefname{FancyVerbLine}{line}{lines}
\Crefname{FancyVerbLine}{Line}{Lines}