1

I am trying to produce an output like for citing to footnotes:

K. van Berkel (2005), 'De Rerum Natura: revisited', pp. 215--218.

K. van Berkel (2004), Citings from the book of nature.

i.e.

T.H.E. Author (year), shorttitle, optional page number.

to be cited like:

\mycite[215--218]{vanberkel2005}

I am using biblatex:

\usepackage[backend=biber,style=authoryear,sorting=ynt, useprefix=true]{biblatex} 

I've tried fiddling around with the command \AtEveryCitekey with \clearfield{publisher} etc. in the preamble, but it does not do what it is supposed to: It does not change/remove anything when I use \fullcite. The code in the preamble that I used was:

\AtEveryCitekey{% 
\clearfield{publisher}%
\clearfield{address}%
\clearfield{journal}%
\clearfield{pages}%
\clearfield{volume}%
}

Creating custom cite commands daunts me. For instance I am unable to customize the answer here because I do not understand half the code.

2
  • Do you still have other citations in the classical author-year format around, or do you want all citations to switch to your new format? If there is an algorithm to decide the format of the output (say all @books must be 'author (year) title', all @articles only 'author year') that could be implemented directly. Ideally you would show us a full MWEB/MWE of what you have so far instead of just a few code snippets. That way we can check that our solutions give the desired output with your setup.
    – moewe
    Aug 22, 2017 at 8:52
  • Indeed, all citations will be in the same way. I only use the authoryear style in the bibliography.
    – Thagusta
    Aug 22, 2017 at 11:13

1 Answer 1

2

This solution uses authoryear.cbx as base and defines a new cite macro mycite that is basically a copy of authoryear.cbx's standard cite macro, but additionally includes a bit of authortitle.cbx's cite:title. Furthermore we define a new name format that is similar to the standard labelname, but always gives at least initials.

\documentclass[british]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareNameFormat{labelname:ext}{%
  \ifnum\value{uniquename}<2
    \ifuseprefix
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefix}
        {\namepartsuffixi}}
      {\usebibmacro{name:given-family}
        {\namepartfamily}
        {\namepartgiveni}
        {\namepartprefixi}
        {\namepartsuffixi}}%
  \else
    \usebibmacro{name:given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}%
  \fi
  \usebibmacro{name:andothers}}


\newbibmacro*{cite:title}{%
  \printtext[bibhyperref]{%
    \printfield[citetitle]{labeltitle}}}

\newbibmacro*{mycite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}}
       {\printnames[labelname:ext]{labelname}}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{cite:labelyear+extrayear}}%
     \setunit{\addcomma\space}%
     \usebibmacro{cite:title}}
    {\usebibmacro{cite:shorthand}}}

\DeclareCiteCommand{\myfootcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{mycite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}
Lorem\myfootcite[12]{sigfridsson} ipsum\myfootcite{nussbaum,geer}

\printbibliography
\end{document}

gives

1 E. Sigfridsson and U. Ryde (1998), ‘Comparison of methods for deriving atomic charges from the electrostatic potential and moments’, p. 12.

2 M. Nussbaum (1978), Aristotle’s ‘De Motu Animalium’; I. d. Geer (1985), ‘Earl, Saint, Bishop, Skald – and Music’.

in the footnotes.

0

You must log in to answer this question.

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