6

I have the same situation as the following user: biblatex: Enhancing \autocite in case of would-be nested footnotes

I want to use \autocite within a \footnote. This results in the citation being wrapped in parenthesis. I want to change the behavior of \autocite used within \footnote to print the citation without the parenthesis like a simple call of \cite would do.

How can I change the behavior of \autocite within the \footnote?

Michael
  • 291

1 Answers1

8

The solution depends on the citation style. For styles like authortitle, verbose and their respective variants (and also for biblatex-juradiss) that execute autocite=footnote, we only need to redefine the underlying \smartcite macro so that it does not add parentheses in footnotes (by replacing \mkbibparens with \textnormal).

\documentclass{article}

\usepackage[style=authortitle]{biblatex}

\DeclareCiteCommand{\smartcite}[\iffootnote\textnormal\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareMultiCiteCommand{\smartcites}
    [\iffootnote\textnormal\mkbibfootnote]{\smartcite}{\multicitedelim}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\null\vfill% just for the example

Some text \autocite{A01}.

Some text.\footnote{A footnote \autocite{A01}.}

\printbibliography

\end{document}

enter image description here

For styles like authoryear that by default execute autocite=inline (which uses \parencite), we need to declare a new autocite option value (say, inlineplainfootnote) that points to a new underlying macro (say, \mysmartcite) that does what you want (add parentheses in normal text, don't add them in footnotes).

\documentclass{article}

\usepackage[style=authoryear]{biblatex}

\DeclareAutoCiteCommand{inlineplainfootnote}{\mysmartcite}{\mysmartcites}

\DeclareCiteCommand{\mysmartcite}[\iffootnote\textnormal\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareMultiCiteCommand{\mysmartcites}
    [\iffootnote\textnormal\mkbibparens]{\mysmartcite}{\multicitedelim}

\ExecuteBibliographyOptions{autocite=inlineplainfootnote}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\null\vfill% just for the example

Some text \autocite{A01}.

Some text.\footnote{A footnote \autocite{A01}.}

\printbibliography

\end{document}

enter image description here

lockstep
  • 250,273