2

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?

mathse
  • 101

1 Answers1

4

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}

"(Sigfridsson and Ryde 1998; Knuth 1984)" only family names in small caps

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}

"(Sigfridsson and Ryde 1998; Knuth 1984)" only family names in small caps

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}

"(Sigfridsson and Ryde 1998; Knuth 1984)" only family names in small caps

Note how the 'and' between Sigfridsson and Ryde is also in small caps here.

moewe
  • 175,683
  • 1
    New 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', ...). – moewe Aug 23 '20 at 18:36
  • 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. – Gabi Aug 23 '20 at 17:24