I use biblatex with the authoryear style and want the author to be printed in my text (when citing) in capital letters, as well as in the bibliography at the end of my article. Is this possible?
1 Answer
There are several ways to format (bits of) names in biblatex
.
I opted for small caps in the following example because I don't think capital letters will look good.
Name parts
If you only want to format a particular part of the name (e.g. the family/last name part or the given/first name part), you can redefine \mkbibnamefamily
, \mkbibnamegiven
, \mkbibnameprefix
and/or \mkbibnamesuffix
with your desired style.
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\autocite{sigfridsson,knuth:ct:a}
\printbibliography
\end{document}
Complete names
Instead of redefining all four macros \mkbibnamefamily
, \mkbibnamegiven
, \mkbibnameprefix
and \mkbibnamesuffix
to do the same, it is easier to redefine the macro \mkbibcompletename
to format the complete name at once.
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\renewcommand*{\mkbibcompletename}[1]{\textsc{#1}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\autocite{sigfridsson,knuth:ct:a}
\printbibliography
\end{document}
Note how given names are also in small caps in the bibliography.
The entire field
If you want to format the entire field including delimiters like the comma and 'and', you can use a wrapper format.
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\DeclareNameWrapperFormat{default}{\textsc{#1}}
\DeclareNameWrapperAlias{sortname}{default}
\addbibresource{biblatex-examples.bib}
\begin{document}
\autocite{sigfridsson,knuth:ct:a}
\printbibliography
\end{document}
Note how the 'and' between Sigfridsson and Ryde is also in small caps here.
-
Thank you for solving this problem. It has partly solved my problem too. I need small caps in bibliography only, not in citations. Any help? Thanks in advance.– GabiAug 23, 2020 at 17:24
-
1New versions have
\mkbibcompletename
to format the entire name at once. Furthermore one could use\DeclareNameWrapperFormat
if one wanted to format the entire fielod output including delimiters (comma, 'and', ...).– moeweAug 23, 2020 at 18:36
\documentclass{...}
and ending with\end{document}