0

The ABNT style uses uppercase for authors family name. When citing an author named John Doe and year 2021, it gives (DOE, 2021). I want to get the authors full name, so I followed the solution provided by @loved-by-Jesus in Cite Author's Full Name. It is not enough, since ABNT style formats the family name in uppercase, resulting in John DOE instead of the intended John Doe. I tried to use \capitalisewords from mfirstuc package, but it did not work out.

Here is the sample code:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=abnt,ittitles]{biblatex}
\usepackage{hyperref}
\usepackage{mfirstuc}
\newrobustcmd*{\citefirstlastauthor}{\AtNextCite{\DeclareNameAlias{labelname}{given-family}}\citeauthor}
\newcommand\theauthorname[1]{\capitalisewords{\expandafter\citefirstlastauthor*{#1}}}
\begin{filecontents*}{test.bib}
@article{doe2021,
  author = {John Doe and Mary White and Cris Ross},
  title = {Author Title Test},
  journal = {Test Journal},
  year = {2021}
}
\end{filecontents*}
\addbibresource{test.bib}
\usepackage{usebib}
\newbibfield{author} 
\newbibfield{address} 
\bibinput{test}
\begin{document}
\theauthorname{doe2021}\\
\textcite{doe2021}\\
\usebibentry{doe2021}{author}
\printbibliography
\end{document}

and the result:

enter image description here

The solution provided by @nicholas-hamilton in How to cite full author name, uses usebib package, which gives you almost the correct text (since it keeps the connecting words and instead of using comma, and does not translate it when the document is in a different language), and it also does not create the link to the bibliography.

How to get the full names John Doe, Mary White e Cris Ross and still link it to the bibliography?

1

Since biblatex-abnt modifies the name macros quite a bit, we need some code to reverse some of those changes. \textcite does not capitalise the names, so I hunted down the required code from there.

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=abnt,ittitles]{biblatex}
\usepackage{hyperref}

\DeclareCiteCommand{\citefirstlastauthor}
  {\DeclareNameAlias{labelname}{given-family}%
   \let\multinamedelim\multinamedelimorig
   \let\finalnamedelim\finalnamedelimorig
   \let\mkbibnamefamily\origmkbibnamefamily
   \let\mkbibnamegiven\origmkbibnamegiven
   \let\mkbibnameprefix\origmkbibnameprefix
   \let\mkbibnamesuffix\origmkbibnamesuffix
   \boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}%
  {\ifciteindex%
     {\indexnames{labelname}}%
     {}%
   \printtext[bibhyperref]{\printnames{labelname}}}%
  {\multicitedelim}%
  {\usebibmacro{postnote}}%

\begin{filecontents*}{\jobname.bib}
@article{doe2021,
  author = {John Doe and Mary White and Cris Ross},
  title = {Author Title Test},
  journal = {Test Journal},
  year = {2021}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\citefirstlastauthor{doe2021}

\textcite{doe2021}

\printbibliography
\end{document}

John Doe, Mary White e Cris Ross

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.