0

Using the hyperref package, I want to have my cross-reference links (tables, figures, sections) to be formatted in small-caps. I'm aware of the frenchlinks option, but that turns every link into small caps. I would much prefer to still have normal URL-links e.g and only the cross-references are formatted in small-caps, just like it's possibly to have different colors for different types of links.

\documentclass{article}

\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{hyperref}

\begin{document}

\section{Introduction}\label{sec:section}

\begin{figure}
    \includegraphics[scale=0.2]{example-image-a}
    \caption{Figure}
    \label{fig:figure}
\end{figure}

Text. \autoref{sec:section}

Some more Text. \autoref{fig:figure}
\end{document}
2
  • you can revert the font for url links \renewcommand\UrlFont{\normalfont}, see tex.stackexchange.com/a/528152/2388 May 4, 2020 at 12:39
  • there is also \hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black}.
    – Oni
    May 30, 2021 at 12:46

1 Answer 1

0

Perhaps try cleveref

Use the \cref and \Cref from cleveref. I have manually changed the figure names to German (as best I can), but am confident the names for a specific language could be pulled out by finding the appropriate commands.

enter image description here

\documentclass{article}

\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{hyperref}

\usepackage{cleveref}
\crefname{figure}{abbildung}{abbildungs}
\Crefname{figure}{Abbildung}{Abbildungs}

\begin{document}
\section{Introduction}\label{sec:section}
\begin{figure}
\includegraphics[scale=0.2]{example-image-a}
\caption{Figure}
\label{fig:figure}
\end{figure}

Text. \cref{sec:section} and \Cref{sec:section}
Some more Text. \cref{fig:figure} and \Cref{fig:figure}.
\end{document}

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.