Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've been looking around and note found an answer to this question, which surprises me given the style is somewhat common.

I just switched over to biblatex because some journals in my field use footnotes instead of inline citations, and it can easily switch between the two. My problem is that I cannot seem to get any combination of biblatex commands to produce a citation with the author name inline and year in the footnote. (I'm using authoryear-icomp as the biblatex style.)

Example of what I'd like:

In my article I reference the recent work of Authorname^1, which is important.

^1: <this is a footnote containing only> Year.

In natbib terms, I'd like a \citet{} command that puts the name in the text but puts the year in the footnote. I have no problem using \footcite to get Author and year into a footnote, but can't seem to figure out how to keep an author's name in the text so certain sentences can keep their flow.

I could obviously work around this by writing out the author's name, footnoting the year, and using \nocite to put it in the bibliography. This, however, would defeat the whole purpose of being to easily switch between journal requirements.

I figure there's an easy solution and I'm just being a tool. Help?

share|improve this question
add comment

1 Answer 1

up vote 6 down vote accepted

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}

Sample output

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}

Sample output

share|improve this answer
    
Thank you Andrew. The first code you posted resolved my issue: the default citation style for this (atypical) journal is author-year footnote, but just year if you refer to the author's name explicitly (i.e. the difference for inline citation of full parenthetical vs. only the year in parentheses). Here, autocite worked for the default citations, and citify for these odd cases where the author's name appears in the text. With the edited code you posted I was unable to get standard author-year in footnote citation, as it made puts the name in the text always (since foot cite does not work). –  user21978 Nov 12 '12 at 11:14
    
It was unclear what features you needed to have working. I have now reposted the code of my first solution. I'll think about trying to get the second solution to work with a \footcite... –  Andrew Swann Nov 12 '12 at 12:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.