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}
There are several problems with your example code.
You should start by immediately removing both arguments from the document
environment. The instruction should read
\begin{document}
rather than \begin{document}[a4paper,12pt]
. The document
environment does not take arguments. Nothing good is going to come from supplying arguments, optional or otherwise, to the document
environment.
Don't load both the biblatex
package and the natbib
package. Select one or the other, but not both.
Assuming you want to continue with natbib
(@Johannes_B's learned opinion notwithsstanding...), you need to observe that the ieeetr
bibliography style is not compatible with authoryear-style citation call-outs. You should therefore load the natbib
package with the options numbers
and comma
, not authoryear
and comma
. Don't forget to delete the instruction \addbibresource{bib/literature.bib}
and to replace \printbibliography
with \bibliography{bib/literature}
-- note: no filename extension. By the way, with numeric-style citation call-outs in use, \citet
will give you a warning message; use \cite
instead.
If you do need or want authoryear-style citation call-outs along with IEEE-style formatted bib entries, I suggest you switch to the IEEEtranN
bibliography style. If you go this route, be sure to omit the numbers
option when loading natbib
.
The output from your (somewhat condensed) working example then is as follows.
\RequirePackage{filecontents}
\begin{filecontents}{lit.bib}
@article{england2002,
title = {Stochastic claims reserving in general insurance},
author = {England, Peter D and Verrall, Richard J},
journal = {British Actuarial Journal},
volume = {8},
number = {03},
pages = {443--518},
year = {2002},
publisher= {Cambridge University Press}
}
\end{filecontents}
\documentclass[a4paper,12pt]{article} % just for this example
\usepackage[comma]{natbib}
\bibliographystyle{IEEEtranN}
\begin{document}
as mentioned in \citet{england2002}, \dots
\bibliography{lit}
\end{document}
Best Answer
The
\ifciteibid
test must be removed from thetextcite
bibmacro. For convenience, I use thexpatch
package to selectively change the bibmacro's definition.EDIT: Here are the modifications necessary for the
authoryear-icomp
style (which uses a different implementation oftextcite
):