24

For my PhD thesis, I am including a List of appended papers automagically. To generate the references, I used to use \bibentry, but now I switched to biblatex and headed for \fullcite hoping it to be an equivalent. Alas, \fullcite uses maxcitenames to decide the number of authors; I'd like it to use maxbibnames so that the number of authors printed is like it is in the bibliogaphy.

\documentclass{article}
\usepackage[maxbibnames=99,maxcitenames=1]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and Buthor, B. and Cuthor, C. and Duthor, D.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This is by \textcite{A01}, or, more completely:
\fullcite{A01}.

\printbibliography
\end{document}

The desired effect:

This is by Author et al. [1], or, more completely, A. Author, B. Buthor, C. Cuthor, and D. Duthor, Alpha, 2001

The actual effect:

resulting document

How do I get a full citation with all authors (or maxbibnames no. of authors) with \fullcite or a similar command in biblatex? If I change maxcitenames, then Author et al. [1] will also be affected, and this is not desired.

All my \fullcite occurences are concentrated in one part of the document that uses no other citation commands, so a solution temporarily changing maxcitenames would be acceptable for me.

12

You may change the definition of the \fullcite and \footfullcite cite macros so that they locally use the value of maxbibnames.

\documentclass{article}
\usepackage[maxbibnames=99,maxcitenames=1]{biblatex}
\makeatletter
\DeclareCiteCommand{\fullcite}
  {\defcounter{maxnames}{\blx@maxbibnames}%
    \usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\DeclareCiteCommand{\footfullcite}[\mkbibfootnote]
  {\defcounter{maxnames}{\blx@maxbibnames}%
    \usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\makeatother
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and Buthor, B. and Cuthor, C. and Duthor, D.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This is by \textcite{A01}, or, more completely:
\fullcite{A01}.

\printbibliography
\end{document}

enter image description here

  • Great! That was more difficult than I had expected. – gerrit Jul 31 '13 at 18:22
  • See also Kevin's answer here. – Jost May 29 '15 at 14:24
15

Either make a new command:

\newcommand{\printpublication}[1]{\AtNextCite{\defcounter{maxnames}{99}}\fullcite{#1}}

Or modify \fullcite globally:

\preto\fullcite{\AtNextCite{\defcounter{maxnames}{99}}}

MWE:

\documentclass{article}
\usepackage[maxbibnames=99,maxcitenames=1]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and Buthor, B. and Cuthor, C. and Duthor, D.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\preto\fullcite{\AtNextCite{\defcounter{maxnames}{99}}}

\begin{document}
This is by \textcite{A01}, or, more completely:
\fullcite{A01}.

\printbibliography
\end{document}

enter image description here

1

Here is also how to do this by resetting \blx@maxcitenames locally. Using tracing, one can see that:

...
\blx@resetdata ->\let \blx@saved@do \do \let \do \blx@imc@clearname \abx@doname
s \let \do \blx@imc@clearlist \abx@dolists \let \do \blx@imc@clearfield \abx@do
fields \do {options}\do {labeltitle}\do {labelyear}\do {labelmonth}\do {labelda
y}\do {datelabelsource}\abx@dointernalfields \def \do ##1{\togglefalse {abx@boo
l@##1}}\abx@dobooleans \let \do \blx@saved@do \c@citecounter \z@ \iftoggle {blx
@bibliography} {\c@maxnames \blx@maxbibnames \relax \c@minnames \blx@minbibname
s \relax } {\c@maxnames \blx@maxcitenames \relax \c@minnames \blx@mincitenames 
\relax }\c@maxitems \blx@maxitems \relax \c@minitems \blx@minitems \relax 

So, one could either temporarily set the toggle blx@bibliography to true (in local scope): that would end up using \blx@maxbibnames -- or, one could temporarily (in local scope) set the "counter" \blx@maxcitenames to say 99; note \blx@maxcitenames is not an actual \newcount or \newcounter, it is a "mere" command.

Below the example temporarily/locally sets the \blx@maxcitenames to 99, the typeouts should confirm that that change does not influence global scope; output is the same as in accepted answer.

\documentclass{article}
\usepackage[maxbibnames=99,maxcitenames=1]{biblatex}
\usepackage{filecontents}
\usepackage{trace}
\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A. and Buthor, B. and Cuthor, C. and Duthor, D.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}


This is by \textcite{A01}, or, more completely:
\makeatletter%
\typeout{blx@maxcitenames: \blx@maxcitenames}%
\bgroup% start local scope group
  % \advance\blx@maxcitenames 2\relax % cannot: not a count!
  \def\blx@maxcitenames{99}%
  \makeatother%
  % \traceon % if tracing is desired
  \fullcite{A01}.
  % \traceoff
\egroup%

\makeatletter
\typeout{blx@maxcitenames: \blx@maxcitenames}
\makeatother

\printbibliography
\end{document}

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.