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?

2
  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}
    – BambOo
    Commented Aug 11, 2018 at 13:16
  • 1
    Do you want all capitals just for family name or all name parts? Commented Aug 11, 2018 at 13:17

1 Answer 1

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.

2
  • 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
    Commented Aug 23, 2020 at 17:24
  • 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
    Commented Aug 23, 2020 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .