1

I've created a small example where I want to get the author name in small caps. The intended result is Knuth's (1984) but it is producing KNUTH's (1984).

\documentclass{article}
\usepackage[style=abnt,ittitles]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{donaldknuth1984,
 author = {Donald E. Knuth},
 title = {The TeXbook},
 publisher = {Addison-Wesley Professional},
 year = {1984},
 isbn = {0201134489}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\newcommand\posscite[1]{\citeauthor*{#1}'s \citeyear{#1}}
\begin{document}
\posscite{donaldknuth1984}
\end{document}

It might be necessary to redefine \citeauthor in abnt.cbx, but I did not manage to do so. I've also tried to define \posscite forcing a lowercase: \newcommand\posscite[1]{\lowercase\expandafter{\citeauthor*{#1}}'s \citeyear{#1}}, but it also did not work.

LEo
  • 772
  • Olá Leo. Have you tried the commands \textcite{AuthorA} and \textcites{AuthorA}{AuthorB}? A suggestion would be to use \renewcommand to apply \textcite to your already in use command. – FHZ Apr 13 '21 at 14:21
  • from @moewe answers and comment, I'd advice you to check if your are supposed or not to follow Brazilian norm NBR10520, since you're using abnt style in biblatex. My main concerne is coherence. ABNT uses "e" for more than one author, and the possessive form with 's is not Portuguese. I may use abnt style for other languages for any reasons, just revise carefully if everything is correctly defined. – FHZ Apr 13 '21 at 16:29

2 Answers2

2

I recommend you use the approach to \posscite explained in my answer to Author name of \textcite as possessive

\documentclass{article}
\usepackage[style=abnt,ittitles]{biblatex}

\DeclareNameWrapperFormat{textlabelname:poss}{#1's}

\DeclareFieldFormat{shorthand:poss}{% \ifnameundef{labelname}{#1's}{#1}}

\DeclareFieldFormat{citetitle:poss}{\mkbibemph{#1}'s}

\DeclareFieldFormat{label:poss}{#1's}

\newrobustcmd*{\posscitealias}{% \AtNextCite{% \DeclareNameWrapperAlias{labelname}{textlabelname:poss}% \DeclareFieldAlias{shorthand}{shorthand:poss}% \DeclareFieldAlias{citetitle}{citetitle:poss}% \DeclareFieldAlias{label}{label:poss}}}

\newrobustcmd*{\posscite}{% \posscitealias% \textcite}

\newrobustcmd*{\Posscite}{\bibsentence\posscite}

\newrobustcmd*{\posscites}{% \posscitealias% \textcites}

\addbibresource{biblatex-examples.bib}

\begin{document} \posscite{worman} \end{document}

Worman’s (2002)

The advantage of this approach is that you do not have to define \posscite by lobbing together several \...cite... commands into one \newcommand (which usually has negative impact on citation tracking and is harder to handle if you want to get pre- and postnotes right).

moewe
  • 175,683
  • does your answer replaces the letter "e" used in \textcites{}{} for an "and"? – FHZ Apr 13 '21 at 16:31
  • 1
    @FHZ It doesn't change anything apart from the "'s", no. But if you add language=auto to the biblatex loading options, you allow biblatex to adapt to the document language instead of forcing Brazilian Portuguese (which is biblatex-abnt's preset). – moewe Apr 13 '21 at 18:08
0

I add another author (a fake one) and used the command \textcite{} and the version to properly handle more than one \textcites{}.

\usepackage[style=abnt,ittitles]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{donaldknuth1984,
 author = {Donald E. Knuth},
 title = {The TeXbook},
 publisher = {Addison-Wesley Professional},
 year = {1984},
 isbn = {0201134489}
}
@book{other2021,
  author = {Other Author},
  title = {Title},
  publisher = {Addison-Wesley Professional},
  year = {2021},
  isbn = {0201134489}
}
\end
\end{filecontents*}
\addbibresource{\jobname.bib}
\newcommand\posscite[1]{\citeauthor*{#1}'s \citeyear{#1}}
\begin{document}
%\posscite{donaldknuth1984}
\textcite{donaldknuth1984}

\textcites{donaldknuth1984}{other2021} \end{document}

The result follows. Please notice that only the plural version \textcites{A}{B}...{N-1}{N} adds the letter "e" between citation {N-1} and {N}.

enter image description here

FHZ
  • 3,939
  • 1
    I agree that a \textcite-based approach is absolutely the right thing, but if I understand correctly, it needs a wee bit more. If I read the question correctly, the desired output would be "Knuth's (1984)" with an 's. – moewe Apr 13 '21 at 15:58
  • Indeed, your understanding of the question is totally right @moewe. On the other hand, it makes me wonder why does OP want and 's added to authors name. As OP is using abnt style and his profile says he lives in Brazil, I'd assume he should use the norm NBR10520, which does not have 's. Despite that, your answer is a very interesting. I'd never imagine such solution. Thanks for sharing it and the links. – FHZ Apr 13 '21 at 16:23