18

I'm using the authoryear style in biblatex with the following options name length options:

maxcitenames=1, mincitenames=1, maxbibnames=999, minbibnames=999

So citations (usually issued with \cite) are properly typeset with only one author like

Shakespeare et al, The...

However I want to typeset a single citation (via \fullcite) with all authors listed, eg.

W. Shakespeare, J. Austen and D. Adams, The...

How can I temporarily increase the values of maxcitenames and mincitenames? Or is there another way to typeset only the \fullcite citatation with all names?

3 Answers 3

10

If you want to be able to make full use of all of biblatex's features for \fullcite, namely pre- and postnotes, you might want to try this version.

We temporarily set maxcitenames to maxbibnames; apparently, there is no need to re-set the counter, because everything is wrapped in a group, so the assignment is locally.

A simpler solution than the below wrapper is

\makeatletter
\DeclareCiteCommand{\longfullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\c@maxnames\blx@maxbibnames\relax
      \DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
\makeatother

\makeatletter
\newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{\blx@maxbibnames}#1}
\makeatother

\DeclareCiteCommand{\longfullcite}[\tempmaxup]
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Unfortunately, I have found no better way of doing this than via that wrapper command.

The MWE

\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
  author           =  {First I. Last and Second Y. Author and Third Z. Author and Fourth Q. Author},
  title            = {This is the article title},
  journal          = {T Journal T},
  journallongtitle = {The Journal Title},
  year             = 1994,
  volume           = 50,
  number           = 6,
  pages            = {30--40},
}
\end{filecontents}

\documentclass{article}
\usepackage[style=authoryear, maxcitenames=1, maxbibnames=999]{biblatex}
\addbibresource{\jobname.bib}

\makeatletter
\newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{\blx@maxbibnames}#1}
\makeatother

\DeclareCiteCommand{\longfullcite}[\tempmaxup]
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\begin{document}
\begin{tabular}{ l p{8cm} }
  \verb|\autocite| & \autocite{Reference:1994}\\
  \verb|\longfullcite| &\longfullcite{Reference:1994}\\
  \verb|\longfullcite| & \longfullcite[see][14]{Reference:1994}\\
  \verb|\fullcite| & \fullcite{Reference:1994}\\
  \verb|\autocite| &\autocite{Reference:1994}\\
\end{tabular}

\printbibliography
\end{document}
% end of file comment

yields

enter image description here

5
  • Nice. Why does \tmpmaxup have to be defined as taking an argument?
    – Alan Munn
    Commented Nov 4, 2013 at 11:48
  • @AlanMunn Well, I could not get the redefinition of the counter to work in the pre- or post-code fields, so it had to be the wrapper command. The wrapper command must take one argument, which is the citation. (That is, if you take \mkbibparens as wrapper, the \cite command will we wrapped in parentheses.)
    – moewe
    Commented Nov 4, 2013 at 16:35
  • 1
    Ok. That makes a bit more sense now. I hadn't thought of the analogy to \mkbibparens. (I also tried to put the redefinition in the pre-code without success.)
    – Alan Munn
    Commented Nov 4, 2013 at 16:43
  • +1. Very nice solution. I've tried it and it works as advertised.
    – halloleo
    Commented Nov 4, 2013 at 23:08
  • @moewe: I am having trouble using your \longfullcite command with certain Biber/BibTeX entries. The problem is too complicated to describe in a comment so I've opened a separate question for it.
    – Psychonaut
    Commented Jan 27, 2017 at 20:44
25

To change maxnames for one citation only you may use the counter:

\AtNextCite{\defcounter{maxnames}{99}}\fullcite{Reference:1994}

This sets both maxcitenames and maxbibnames but in your case this is not probably the problem. Unfortunately there is no maxcitenames counter in biblatex.

You may also define a dedicated command for such citations:

\newcommand{\longfullcite}{%
  \AtNextCite{\defcounter{maxnames}{99}}%
  \fullcite}
2
  • 3
    +1 It seems that it will take me longer to learn biblatex than it did to learn LaTeX.
    – Alan Munn
    Commented Nov 4, 2013 at 14:02
  • 5
    I adore biblatex for the things like this :) Commented Nov 4, 2013 at 17:14
6

Here's a kind of hacky way to do this. Because of the complexity of the arguments of the \cite commands, it's not easy to wrap code around them. So the following solution assumes that you will just use \fullcite with a single argument and none of its optional arguments. I'd be interested in seeing a more elegant way to do this.

\begin{filecontents}{\jobname.bib}
@Article{Reference:1994,
  author =   {First I. Last and Second Y. Author and Third Z. Author and Fourth Q. Author },
  title =    {This is the article title},
  journal =  {T Journal T},
  journallongtitle =     {The Journal Title},
  year =     1994,
  volume =   50,
  number = 6,
  pages =    {30--40}
}
\end{filecontents}

\documentclass{article}
\usepackage[style=authoryear,maxcitenames=1, mincitenames=1, maxbibnames=999,
     minbibnames=999]{biblatex}
\addbibresource{\jobname.bib}

\makeatletter
\newcommand{\upmax}{\def\blx@maxcitenames{99}}
\newcommand{\dnmax}{\def\blx@maxcitenames{1}}
\makeatother

\newcommand\myfullcite[1]{\upmax\fullcite{#1}\dnmax} % does not allow pre or postnotes

\begin{document}
\autocite{Reference:1994}

\myfullcite{Reference:1994}

\autocite{Reference:1994}

\printbibliography
\end{document}

output of code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .