4

I am trying to achieve a biblatex style that would do the following:

in the case of \parencite{} I would get ...like that (Smith 2010).

in the case of \textcite{} I would get Smith (2010) says that...

but in References I would get SMITH, J. Bookname.

How can I achieve this?

I use \usepackage[style=authoryear, firstinits=true]{biblatex}

I tried \renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}} but that makes the name uppercase even in the text, which is undesirable especially with \textcite{}

12

You need to change the macro just for the bibliography and biblatex provides a hook to do this in the form of \AtBeginBibliography:

\documentclass{article}
\usepackage[style=authoryear, firstinits=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\AtBeginBibliography{\renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}}}

\begin{document}
Here is some text \parencite{angenendt}. Note that \textcite{angenendt} mentions something.

\printbibliography
\end{document}

This produces:

Capitalised last names in bibliography only


EDIT

Current versions of biblatex have a slightly different naming scheme, for them the code should be:

\documentclass{article}
\usepackage[style=authoryear, giveninits=true]{biblatex}
\addbibresource{biblatex-examples.bib}
\AtBeginBibliography{\renewcommand*{\mkbibnamefamily}[1]{\MakeUppercase{#1}}}

\begin{document}
Here is some text \parencite{angenendt}. Note that \textcite{angenendt} mentions something.

\printbibliography
\end{document}
  • @cfr Please feel free to undo my edit if you don't like it. – user36296 Jul 28 '17 at 13:21
  • @samcarter Not at all. Thanks for adding the code to work with the update. I'd not remembered I answered a question which would be affected by the changes to Biblatex or I'd have updated it myself. – cfr Jul 28 '17 at 15:29

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.