Some citation commands are intended for use "in the flow of text". Examples include \textcite
, \citetitle
, \citeauthor
and \citeyear
. If you stick to these commands and \autocite
, you can get by with just a change in biblatex
load-time option settings.
In the authoryear
styles, \autocite
is based on \parencite
. In verbose
styles, \autocite
invokes \smartcite
, which behaves like \parencite
in footnotes and \footcite
inline. The neat thing about \autocite
is that it moves punctuation for you. The starred variant \autocite*
issues the starred version of its backend citation command. In authoryear
styles this is \parencite*
, which prints only year
.
Possessive citations just require a change to the labelname
format in \textcite
. In the example below I adapted the solution in this post. Full person names are printed the first time an entry is cited via \textcite
or \citeauthor
with the help of another answer by domwass. To cope with differences in the construction of the authoryear
and verbose
citation commands, I've defined some patches using etoolbox
extensions by egreg.
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\usepackage[colorlinks]{hyperref}
\makeatletter
% patch bibmacros without optional arguments
\def\act@on@bibmacro#1#2{%
\expandafter#1\csname abx@macro@\detokenize{#2}\endcsname}
\def\pretobibmacro{\act@on@bibmacro\pretocmd}
% patch citation commands
\def\act@on@citecmd#1#2{%
\expandafter#1\csname blx@citei@\detokenize{#2}\endcsname}
\def\patchcitecmd{\act@on@citecmd\patchcmd}
% patch default name formats
\def\act@on@nameformat#1#2{%
\expandafter#1\csname abx@nfd@*@\detokenize{#2}\endcsname}
\def\pretonameformat{\act@on@nameformat\pretocmd}
\def\apptonameformat{\act@on@nameformat\apptocmd}
% track seen labelnames
\newcommand*{\cbx@seennames}{}
\newrobustcmd*{\cbx@nameseen}[1]{\listxadd{\cbx@seennames}{\detokenize{#1}}}
\newrobustcmd*{\cbx@ifnameseen}[1]{\xifinlist{\detokenize{#1}}{\cbx@seennames}}
% define fullname-if-not-seen labelname format
\csletcs{abx@nfd@*@labelname:seen}{abx@nfd@*@labelname}
\pretonameformat{labelname:seen}
{\cbx@ifnameseen{#1#3#5#7}
{}{\defcounter{uniquename}{2}\cbx@nameseen{#1#3#5#7}}}{}{}
% define possessive labelname format
\csletcs{abx@nfd@*@labelname:poss}{abx@nfd@*@labelname:seen}
\apptonameformat{labelname:poss}
{\ifnumequal{\value{listcount}}{\value{liststop}}{'s}{}}{}{}
\makeatother
% use "seen" labelname format in \textcite and \citeauthor
\patchcitecmd{citeauthor}
{\printnames{labelname}}{\printnames[labelname:seen]{labelname}}{}{}
\patchcitecmd{textcite}
{\printnames{labelname}}{\printnames[labelname:seen]{labelname}}{}{}
\pretobibmacro{textcite}{\DeclareNameAlias{labelname}{labelname:seen}}{}{}
% define possessive citation commands
\newrobustcmd*{\possalias}{%
\AtNextCite{\DeclareNameAlias{labelname:seen}{labelname:poss}}}
\newrobustcmd*{\posscite}{\possalias\textcite}
\newrobustcmd*{\Posscite}{\possalias\Textcite}
\newrobustcmd*{\posscites}{\possalias\textcites}
\newrobustcmd*{\Posscites}{\possalias\Textcites}
\addbibresource{biblatex-examples.bib}
\begin{document}
\null\vfill
\Posscite{knuth:ct:a} Principal Principle is one of my favourite principles.
One of my favourite books is \citetitle{knuth:ct:a}. Everybody should be
rational \autocite{knuth:ct:a,vangennep}. \Citeauthor{knuth:ct} said a lot
of things. For instance, he said that everybody should be rational
\autocite*[9]{knuth:ct:a}, and he said that everybody should drive on the
right side of the road \autocite*[10--15]{knuth:ct:c}. \Citeauthor{vangennep}
said that everybody should drive on the left, but otherwise
\posscite[4]{vangennep} work agrees with \citeauthor{knuth:ct}.
\end{document}
Switching to the verbose
style via
\usepackage[style=verbose]{biblatex}
gives
This solution should work with any of the standard authoryear
and verbose
variants. Details on these styles can be found in the biblatex
documentation.
Second solution
Edited again, so most multicite commands work.
Edited so \footcite
now works.
A reasonably effective solution that preserves many of biblatex
's featuers is provided by adjusting the way the year gets printed in citations. This can be done by redifining the commands associated to cite:year
and cite:extrayear
. This has the advantage of preserving the ibidem feature.
The code below includes a sample bibliography and then the main file with the redefined citation code.
\begin{filecontents}{test.bib}
@Article{Test,
author = {Author, A. N.},
title = {Article title},
year = 2005,
pages = {10-20},
journal = {Jour.},
vol = {100}
}
@Article{Test2,
author = {Author, A. N.},
title = {Second article},
year = 2005,
pages = {10-20},
journal = {Jour.},
vol = {100}
}
@Article{Test3,
author = {Author, A. B.},
title = {Third article},
year = 2005,
pages = {10-20},
journal = {Jour.},
vol = {100}
}
@Article{Test4,
author = {Author, A. N.},
title = {Fourth article},
year = 2007,
pages = {10-20},
journal = {Jour.},
vol = {100}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear-icomp,autocite=plain]{biblatex}
\addbibresource{test.bib}
\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
{}
{\iftoggle{blx@footnote}
{\printtext[bibhyperref]{%
\printfield{labelyear}%
\printfield{extrayear}}}
{\footnote{\printtext[bibhyperref]{%
\printfield{labelyear}%
\printfield{extrayear}}}}}}
\renewbibmacro*{cite:extrayear}{%
\iffieldundef{extrayear}
{}
{\iftoggle{blx@footnote}
{\printtext[bibhyperref]{\printfield{extrayear}}}%
{\footnote{\printtext[bibhyperref]{%
\printfield{labelyear}%
\printfield{extrayear}}}}}}
\renewcommand{\compcitedelim}{\space}
\begin{document}
\thispagestyle{empty}
\autocite{Test} and
\autocite[page 3]{Test}.
Some text \parencite{Test2}.
Here is a footnote citation\footcite{Test}.
\autocite{Test,Test4,Test3}.
\printbibliography
\end{document}
As the above shows this works with \autocite
, \parencite
and accepts their optional arguments. In this style \autocite
is the same as \cite
.
I haven't demonstrated \textcite
, though its ouptut may be useful sometimes; \footcite
has also been set up to work, thanks to biblatex
's blx@footnote
toggle that detects whether we are in a footnote or not.
The code also takes care of most multiple citations \cite{ref1,ref2}
. However, there is a spurious comma, if ref1
and ref2
are two publications from the same author in the same year. Fixing that requires, more substanitial rewriting of the citation style file: each of the commands \cite
, \textcite
, etc. in author-icomp.cbx
contains an explicit comma via \setunit{\addcomma}
, that needs to be deleted.
Original solution
Here is a repost of the original solution, as this apparently helps the OP best. It simply defines a newcommand \citepfy
(plain-foot-year) that calls \citeauthor
followed by a modified \footcite
command that produces only the year. It does not accept any of the optional arguments cite commands in biblatex
usually do.
\begin{filecontents}{b.bib}
@Article{Test,
author = {Author, A. N.},
title = {Article title},
year = 2005,
pages = {10-20},
journal = {Jour.},
vol = {100}
}
\end{filecontents}
\documentclass{article}
\usepackage[style=authoryear-icomp]{biblatex}
\addbibresource{b.bib}
\newcommand{\citepfy}[1]{\citeauthor{#1}\footyearcite{#1}}
\DeclareCiteCommand{\footyearcite}[\mkbibfootnote]
{\usebibmacro{cite:init}%
\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{citeyear}}
{}
{\usebibmacro{cite:postnote}}
\begin{document}
\citepfy{Test}
\printbibliography
\end{document}
Best Answer
Probably not the most efficient way to do this (I'm new to biblatex), but it works