# Customizing autocite with biblatex

I am getting some unexpected output with biblatex. In the following MWE I expect to get the same thing with \footcites and \autocites

\documentclass{article}
\usepackage[autocite=footnote]{biblatex}
\DeclareCiteCommand{\footcite}[\mkbibfootnote]{A}{B}{\multicitedelim}{}
\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{\multicitedelim}
\DeclareAutoCiteCommand{footnote}{\footcite}{\footcites}
\bibliography{biblatex-examples.bib}
\begin{document}
\footcite{aksin}
\autocite{aksin}
\footcites{aksin}{aksin}
\autocites{aksin}{aksin}
\end{document}


If I add \letcs\autocites{blx@macite@footnote} then \footcites and \autocites give me the same output. I feel like I am missing something about how autocite works.

Further, if I change the biblatex package options to autocite=myfootnote and use \DeclareAutoCiteCommand{myfootnote}{\footcite}{\footcites} I get errors. What am I doing wrong?

• \DeclareAutoCiteCommand etc. seems to be designed for use in citation style files. I think it will not work properly like this because it is basically too late. It needs to be there as biblatex loads in a .cbx. (But I'm by no means sure about this.) – cfr Feb 8 '14 at 0:17
• These \Declare...CiteCommand macros do seem to be intended to be used in a .cbx file, and as cfr suspects might not be usable in the actual document (I could not find anything explicit about that in the bibliography, but it seems to hint at/point in that general direction). In some cases it might be desirable to make these changes in the document itself though (and not via a .cbx file), so you might want to bring this issue up in the biblatex bugtracker. – moewe Feb 9 '14 at 11:35

To expand a little...

Is this the expected output?

If so, I think you just need to put the relevant commands in a config file rather than including them in your preamble:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{biblatex.cfg}% include commands which biblatex expects to find in e.g. .cbx files here and put the file somewhere tex will find it
\ProvidesFile{biblatex.cfg}
\DeclareCiteCommand{\footcite}[\mkbibfootnote]{A}{B}{\multicitedelim}{}
\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{\multicitedelim}
\DeclareAutoCiteCommand{myfootnote}{\footcite}{\footcites}
\endinput
\end{filecontents}

\usepackage[autocite=myfootnote]{biblatex}
\bibliography{biblatex-examples.bib}
\begin{document}
\footcite{aksin}
\autocite{aksin}
\footcites{aksin}{aksin}
\autocites{aksin}{aksin}
\end{document}

• Yes, that is the expected output. I am surprised that I cannot use them in the document body. – StrongBad Feb 9 '14 at 11:57
• @StrongBad I think that saying autocite=myfootnote requires that myfootnote be defined. However, to define it, you obviously need the commands from biblatex. So, timing-wise, the only way to make that work is to have biblatex read the definition in another file before it processes the autocite=myfootnote option, and that rules out including the definition in the document itself. I suspect something similar is happening with the customisation of footnote since that is only happening after autocite=footnote is processed. So probably you could customise that in a config file. – cfr Feb 9 '14 at 16:49