Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[biblatex] How to define a customized \citeauthor command?

209 views
Skip to first unread message

Denis Bitouzé

unread,
Dec 2, 2010, 10:38:32 AM12/2/10
to
Hello,

I'd like to define my own \citeauthor in order to make it print not
only:

Last Name 1[, Last Name 2...]

but:

FirstName1 LastName1[, FirstName2 LastName2...]

I tried to add in my biblatex.cfg:

\DeclareCiteCommand{\myciteauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{first-last}}
{}%
\printnames{first-last}}
{\multicitedelim}
{\usebibmacro{postnote}}

But \myciteauthor{key} prints nothing

Thanks in anticipation for any workaround.
--
Denis

Philipp Lehman

unread,
Dec 2, 2010, 11:29:03 AM12/2/10
to
Denis Bitouzé wrote:

> \printnames{first-last}

This will try to print the "first-last" name list. Obviously, there is
no such field in any entry. Try this:

\printnames[first-last]{labelname}

--
Sender address blackholed, do not reply directly.
You can still reach me by email at: lehman gmx net.

Herbert Voss

unread,
Dec 2, 2010, 11:30:38 AM12/2/10
to
Am 02.12.2010 16:38, schrieb Denis Bitouzé:

> I'd like to define my own \citeauthor in order to make it print not
> only:
>

prints _all_ authors

\documentclass{article}
\pagestyle{empty}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[style=alphabetic,
block=none,backend=biber]{biblatex}
\DeclareCiteCommand*{\citeauthor}
{\defcounter{maxnames}{99}%
\defcounter{minnames}{99}%
\defcounter{uniquename}{2}%


\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}

{\ifciteindex{\indexnames{labelname}}{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
\bibliography{examples}
\begin{document}

foo~\citeauthor*{murray}; bar~\citeauthor*{padhye};

\printbibliography%[maxnames=99]
\end{document}


Herbert

Denis Bitouzé

unread,
Dec 2, 2010, 12:38:24 PM12/2/10
to
Le jeudi 02/12/10 à 17h30,
Herbert Voss <Herber...@FU-Berlin.de> a écrit :

> prints _all_ authors
>
> [...]

Thanks Herbert.
--
Denis

Denis Bitouzé

unread,
Dec 2, 2010, 12:39:44 PM12/2/10
to
Le jeudi 02/12/10 à 17h29,
Philipp Lehman <devnull....@spamgourmet.com> a écrit :

> This will try to print the "first-last" name list. Obviously, there
> is no such field in any entry. Try this:
>
> \printnames[first-last]{labelname}

It works, but I also understood something: thanks Philipp!
--
Denis

Philipp Lehman

unread,
Dec 2, 2010, 1:00:14 PM12/2/10
to
Denis Bitouzé wrote:

>> \printnames[first-last]{labelname}
>
> It works, but I also understood something: thanks Philipp!

BTW, if you want to force printing of the full list (ignoring
maxnames):

\printnames[first-last][-\value{listtotal}]{labelname}

0 new messages