1

Is it possible to change just the citation number in the bibliography to sans-serif? I tested already the following code, but nothing changed. I think there is a simple hook for this?!

\makeatletter
\def\@biblabel#1{[\textsf{#1}]}
\makeatother

Explaining example:

enter image description here

MWE:

\documentclass{scrreprt}
\usepackage{blindtext}
\usepackage[style=ieee,citestyle=numeric-comp]{biblatex}
\bibliography{Bib.bib}

\begin{document}
\blindtext
\cite{Test}
\printbibliography
\end{document}

Bib.bib:

@article{Test,
author      ={Test, A.},
title       ={Human cells},
journal     ={Biology},
year        ={2018},
}
  • 1
    \DeclareFieldFormat{labelnumber}{\textsf{#1}} to change it everywhere and \DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{\textsf{#1}}} to change it only in the bibliography. – moewe May 24 '18 at 7:11
  • Solved with the comment from @moewe. – D5E May 24 '18 at 7:13
2
\DeclareFieldFormat{labelnumber}{\textsf{#1}}

changes the citation number in all contexts to sans serif

\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{\textsf{#1}}}

only changes the label in the bibliography

\documentclass{article}
\usepackage[style=ieee,citestyle=numeric-comp]{biblatex}
\bibliography{biblatex-examples.bib}

\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{\textsf{#1}}}

\begin{document}
Lorem \cite{sigfridsson} ipsum \cite{worman} dolor \cite{geer} sit \cite{vizedom:related} amet.
\printbibliography
\end{document}

enter image description here

The effect is not very pronounced for the 1 but clearly visible for 2, 3 and 4.

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.