15

In the alphabetic style, I am using maxcitenames=4 and minnames=3 as global options. However, when using \textcite instead of \cite, these settings are pretty unreasonable, and I want it to behave as if maxcitenames=3 and minnames=1 were set. How do I achieve this?

To be more specific, in the example below I want

\cite{ABCDE}

to produce

[ABG+01]

, and

\textcite{ADCDE}

to produce

Alpha, et al. [ABG+01]

Example:

\documentclass{article}

\usepackage[ style=alphabetic, maxcitenames=4, minnames=3 ]{biblatex}

% set \textcite option maxcitenames=3 and minnames=1 here

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{ABCDE,
  author = {Alpha, A. and Beta, B. and Gamma, G. and Delta, D. and Epsilon, E.},
  year = 2001
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\cite{ABCDE}
\textcite{ABCDE}    

\end{document}

2 Answers 2

17

With biber this can be handled by the following option settings.

maxcitenames=3,minnames=1,maxalphanames=4,minalphanames=3

With BibTeX you can define variants of existing citation commands in your document preamble.

\newbool{cbx:resetnames}
\AtEveryCitekey{%
  \ifbool{cbx:resetnames}
    {\defcounter{minnames}{1}\defcounter{maxnames}{3}}
    {}}

\let\origtextcite\textcite
\renewrobustcmd{\textcite}{%
  \AtNextCite{\booltrue{cbx:resetnames}}\origtextcite}

\let\origtextcites\textcites
\renewrobustcmd{\textcites}{%
  \AtNextCite{\booltrue{cbx:resetnames}}\origtextcites}

\let\origciteauthor\citeauthor
\renewrobustcmd{\citeauthor}{%
  \AtNextCite{\booltrue{cbx:resetnames}}\origciteauthor}

Note that since minnames and maxnames are entry-specific options, they must be reset using an entry-specific hook like \AtEveryCitekey.

3
  • How can your second approach be adjusted for fullcite or footfullcite?
    – sebschub
    Commented Jul 22, 2013 at 15:50
  • 1
    @sebschub I've revised the second approach. It should work with any citation command, including multi-citation commands.
    – Audrey
    Commented Jul 22, 2013 at 20:32
  • @Audrey Thanks a lot, I adopted your approach to my needs!
    – sebschub
    Commented Jul 23, 2013 at 11:06
5

You can define a new command using \AtNextCite and setting the maxnames, minnames counters to the desired values; something along the lines illustrated in the following example:

\documentclass{article}
\usepackage[ style=alphabetic, maxcitenames=4, minnames=3 ]{biblatex}

\newrobustcmd{\TExtcite}{%
  \AtNextCite{\defcounter{maxnames}{3}\defcounter{minnames}{1}}\textcite}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{ABCDE,
  author = {Alpha, A. and Beta, B. and Gamma, G. and Delta, D. and Epsilon, E.},
  year = 2001
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{ABCDE}

\TExtcite{ABCDE}    

\textcite{ABCDE}
\end{document}

enter image description here

3
  • This does not seem to work with biblatex 2.7: your \TExtcite yields the same result as \textcite. Any suggestions?
    – sebschub
    Commented Jul 22, 2013 at 15:02
  • @sebschub Try Audrey's answer. Commented Jul 22, 2013 at 15:06
  • 1
    @sebschub This answer was always a bit of a cheat - it never worked when processing more than one entry. This is because minnames and friends are set-able per entry; the values should really be set via a key-specific hook. As of 2.7, \textcite in most standard styles processes each entry at least twice, so resetting the counters via \AtNextCite won't work at all.
    – Audrey
    Commented Jul 22, 2013 at 20:27

You must log in to answer this question.

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