I want to customize the behavior of biblatex's autocite command.

Generally, autocite should behave like footcite. However, in some cases I should be like parencite, e.g. when a shorthand field is defined. (Or, even better, it should behave like parencite when the shorthand field is defined, and when it has not been cited before.)

So, we have the following possible cases:

  1. Shorthand is undefined: Autocite=footnote.

  2. Shorthand is defined: Autocite=inline.

2a. Shorthand is defined, and has the title has been cited before: autocite=inline.

2b. Shorthand is definded, but it is the first citation of the respective title: autocite=footcite.

So, basically it boils down to the question if (and how) I can use tests like \iffieldundef and \ifciteseen in declarations of citation commands.


You can define you own cite command (or redefine an existing one) with \DeclareCiteCommand.

It takes 4 mandatory arguments: the first is for how the pre-note is formatted, the second is for looping over the citations (and actually prints the citation), the third one is for the separator between citations, and the last one if for the post-note. Inside the arguments you can use the standard biblatex instructions, for example:

  {\iffieldundef{shorthand}{no short hand}{\printfield{shorthand}}, 
   \ifciteseen{not the first time}{first time}}

It is possible to use conditionals inside other conditionals.

  • The problem with this is that it will only affect the citation leaving prenotes and postnotes un-affected. I know there is the optional wrapper argument, \DeclareCiteCommand{\mycite}[wrapper] where you can specify something like \mkbibfootnote, but \ifciteseen doesn't seem to work there. – Denis Nov 9 '14 at 13:46
  • Do you use the citetracker=context option? With this option citations in text and in footnote are independent. For pre- and post-note you have to define how they work (and again you can use conditionals in their definitions). – Guido Nov 9 '14 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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