5

I'm referring to this post. Please consider the following MWE:

\documentclass{article}
\usepackage[style=alphabetic, autocite=footnote]{biblatex}

% Footnote modifications:
    \DeclareCiteCommand{\footcite}[\mkbibfootnote]
        {\usebibmacro{prenote}}
        {\usebibmacro{citeindex}%
            \printtext[brackets]{\usebibmacro{cite} \usebibmacro{postnote}}}
        {\multicitedelim}
        {}  

\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]%
    {\footcite}{\multicitedelim}

\DeclareAutoCiteCommand{footnote}[l]{\footcite}{\footcites}

\DeclareFieldFormat{sentencecase}{\MakeSentenceCase{#1}}
\usepackage{xpatch}
\xpatchbibmacro{prenote}{\printfield{prenote}}{\printfield[sentencecase]{prenote}}{}{}

% Inline modifications:
    \DeclareCiteCommand{\parencite}[\mkbibparens]
        {\usebibmacro{prenote}}
        {\usebibmacro{citeindex}%
            \printtext[brackets]{\usebibmacro{cite} \usebibmacro{postnote}}}
        {\multicitedelim}
        {}

\DeclareMultiCiteCommand{\parencites}[\mkbibparens]%
  {\parencite}{\multicitedelim}

\begin{filecontents*}{bibliography.bib}
@BOOK{Cornelisse1979,
  author = {Cornelisse, J. W. and Schöyer, H. Ferry R. and Wakker, Karel F.},
  title = {Rocket Propulsion and Spaceflight Dynamics},
  year = {1979},
  publisher = {Pitman},
}
\end{filecontents*}

\bibliography{bibliography.bib}

\begin{document}
\null
\vfill

How one citation with autocite look like: \autocite[see][35]{Cornelisse1979}
How multicite with autocites look like: \autocites(\autocap{s}ee)()[][20]{Cornelisse1979}[][35]{Cornelisse1979}
How multicite with autocites should look like: \footcites(\autocap{s}ee)()[][20]{Cornelisse1979}[][35]{Cornelisse1979}
\end{document}

With this I can easily switch between inline and footnote citation by changing autocite=footnote to autocite=inline in the package options. Moreover the prenote of any citation will be written with a leading capital letter when using autocite=footnote and with a lower case letter when using autocite=inline (ok need to comment sth. out but it is easy enough).

But what doesn't work. I want the multicite with \autocites to look exactly like the one with \footcites. But any modification shouldn't effect the style when I use autocite=inline instead of autocite=footnote in the package options, because I want to switch between both styles back and forth. Has anyone an idea how to influence the \autocites command?

user2653422
  • 2,333
  • If you define the square brackets like explained in this post, it will work also for \autocite. – ppr Feb 06 '14 at 14:39
  • The pre text will be inside the square brackets with this method. – ppr Feb 06 '14 at 14:41
  • Thank you, but not exactly what I wanted. I now managed to get the \autocite command to work with the following modifications: \DeclareAutoCiteCommand{footnote}[l]{\footcite}{\footcites} added to my first code example. But it doesn't work for the \autocites command, where the references are still without the square brackets. And I didn't get the pre text to be upper case dependent on if it is a inline citation or footnote citation. – user2653422 Feb 06 '14 at 15:18
  • The code in the post I indicated work for \autocites command. But there is still the problem of See/see. – ppr Feb 06 '14 at 17:48
  • 1
    For context sensitive capitalisation try \autocap{s}ee – Oleg Domanov Feb 06 '14 at 18:56
  • Thank you Oleg, this solved the problem with capitalizing the prenote dependent on the context. – user2653422 Feb 06 '14 at 19:18
  • A full MWE would be helpful for testing answers. – StrongBad Feb 07 '14 at 12:44

2 Answers2

2

Solution:

Adding:

\DeclareCiteCommand{\autocite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[brackets]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\autocites}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[brackets]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

MWE:

\begin{filecontents}{biblio.bib}
@Book{author00:_title,
  author =   {Author},
  title =    {Title},
  publisher =    {Publisher},
  year =     2000}
\end{filecontents}

\documentclass[12pt,twoside,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage{setspace}
\usepackage{filecontents}
\usepackage{graphicx} 
\usepackage{lmodern}
\usepackage{xspace}

\usepackage[autostyle=true]{csquotes}
\usepackage[style=alphabetic,
     autocite=footnote,
     hyperref,
     backend=biber,
     isbn=false,
     doi=false,
     url=false,
     date=year]{biblatex}
\AtEveryBibitem{\clearlist{language}}
\bibliography{biblio}
\usepackage[colorlinks]{hyperref}

\DeclareCiteCommand{\autocite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[brackets]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\autocites}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[brackets]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}

\noindent \autocite[see][32]{author00:_title}\\
\autocites[see][]{author00:_title}\\

\printbibliography
\end{document}

enter image description here

ppr
  • 8,994
  • Thank you. I already tried this. One problem is that the prenote, in this case the word 'see' is written within the square bracket. I need to have it outside the brackets, like: See [Aut00, p. 32]. I managed to get the desired behaviour for \autocite (see Edit2 in my original post), but this doesn't work for \autocites (see http://tex.stackexchange.com/questions/159070/biblatexbiber-footcite-style-when-using-autocites where I ask this question). – user2653422 Feb 07 '14 at 12:42
  • Please see my original post. I updated the MWE. Everything except the \autocites command work like desired. – user2653422 Feb 07 '14 at 13:05
  • 1
    Here is the solution (I updated my answer). EDIT: oups too late – ppr Feb 07 '14 at 16:13
  • Nonetheless thank you for your update. I didn't know that I can use \DeclareCiteCommand for \autocites. – user2653422 Feb 08 '14 at 10:37
2

It seems like there might be a bug in biblatex, but more likely I just don't understand what is going on. It appears that \autocites is not respecting the change in the cite command. Adding

\makeatletter
\letcs\autocites{blx@macite@footnote}
\makeatother

to the preamble seems to fix the problem.

A bug report on this has resulted in the documentation now clearly saying that you need

\ExecuteBibliographyOptions{autocite=footnote}
StrongBad
  • 20,495