0

I'm trying to create versions of biblatex commands that cite the author's name in full. The following code seems to get me half way there, though it only uses the initials of the given names rather than the full given names (or even better, full first name with middle name initials), which I would prefer.

If there are any other ways in which the following macro definitions can be improved, I would be glad to know that too.

\newrobustcmd*{\nextcitefullname}{%
    \AtNextCite{\DeclareNameAlias{labelname}{given-family}}% from https://tex.stackexchange.com/a/537722/303
}

% Not sure if I should be using \DeclareCiteCommand here instead. \NewDocumentCommand \citeauthorfullname { s } { \nextcitefullname \IfBooleanTF #1 { \citeauthor* } { \citeauthor } } \NewDocumentCommand \Citeauthorfullname { s } { \nextcitefullname \IfBooleanTF #1 { \Citeauthor* } { \Citeauthor } } \NewDocumentCommand \textcitefullname { } { \nextcitefullname \textcite } \NewDocumentCommand \Textcitefullname { } { \nextcitefullname \textcite }

With the above I will get, e.g., "D. Hume" in my document, rather than "David Hume".

Noldorin
  • 890
  • 1
    You can see this: https://tex.stackexchange.com/questions/120190/how-to-cite-full-author-name?rq=1 – Puck Sep 01 '21 at 17:28
  • That seems like an extremely inelegant and cryptic solution, if I'm honest. (Perhaps in part because it uses natbib, which I do not.) It also seems like the usebib package has problems. – Noldorin Sep 02 '21 at 01:01
  • biblatex does not have a notion of a middle name: All first and middle names are treated as given names, so it is very, very tricky to get full first and initials for the middle names. (There are some solutions on this site, but they all rely on parsing the name on the LaTeX side which can get messy and may mess up the name disambiguation.) If we ignore that point for now your code appears to do what it is supposed to do. It can be simplified a bit, but it works. See https://gist.github.com/moewew/047760379b8a73fa7a148951a5c87fa5. Please show us a complete example document where it doesn't – moewe Sep 02 '21 at 06:48
  • @moewe Thanks for your comment. I am interested in those 'messy' solutions too, at least out of curiosity, so please do link to any. But the first thing would be to get all the given names in full, rather than only initials. For example, I use the biblatex-bath style, and it only displays initials for all names. – Noldorin Sep 04 '21 at 01:03

1 Answers1

2

Your code works as expected with the standard styles and default settings. It can be slightly simplified, but it does what it is supposed to.

The code will not give you full given names, however, in case you (or your style) specify the giveninits option. In this situation you need to locally counter that option by setting the internal toggle for this option to false.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[ backend=biber, style=authoryear, giveninits=true, uniquename=init, natbib ]{biblatex}

\newrobustcmd*{\nextcitefullname}{% \AtNextCite{% \DeclareNameAlias{labelname}{given-family}% \togglefalse{abx@bool@giveninits}}}

\newcommand\citeauthorfullname{% \nextcitefullname\citeauthor}

\newcommand\Citeauthorfullname{% \nextcitefullname \Citeauthor}

\newcommand\textcitefullname{% \nextcitefullname \textcite}

\newcommand\Textcitefullname{% \nextcitefullname \textcite}

\addbibresource{biblatex-examples.bib}

\begin{document} Lorem \autocite{sigfridsson}

\citeauthor{sigfridsson}

\citeauthorfullname{sigfridsson}

\citeauthor{aksin}

\citeauthor*{aksin}

\citeauthorfullname{aksin}

\citeauthorfullname*{aksin}

Lorem \autocite{sigfridsson}

\printbibliography \end{document}

Özge Aksın, Hayati Türkmen, Levent Artok, Bekir Çetinkaya, Chaoying Ni, Orhan Büyükgüngör and Erhan Özkal


As mentioned in the comments, biblatex does not have a notion of a middle name, so there is no easy way to only show the first name and abbreviate middle names. See also the discussion in https://github.com/plk/biblatex/issues/1094 as well as Abbreviate only middle names in biblatex, Bibliography with BibLaTeX: Do not abbreviate first given (first) name and abbreviate all further given names, BibLaTeX: How to keep first given name only?.

moewe
  • 175,683