1

I am using the solution from Is it possible to fine-tune the citation positions in Tufte-BibLaTeX combination? which works nearly perfect. However the punctuation at the end of the citation is not consistent with \autocite.

In the following MWE, the first citation has no . at the end, but the second one has.

\documentclass[nobib]{tufte-handout}
\usepackage{xparse}
\usepackage{xpatch}
\usepackage[
  style=verbose,
  autocite=footnote,
  backend=biber
]{biblatex}
\addbibresource{biblatex-examples.bib}

\makeatletter
\xpatchcmd{\@footnotetext}%
      {\color@begingroup}
      {\color@begingroup\toggletrue{blx@footnote}}
      {}
      {}
\makeatother

\DeclareCiteCommand{\sidecitehelper}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}

\ExplSyntaxOn
\NewDocumentCommand\sidecite{D<>{}O{}om}{%
  \iftoggle{blx@footnote}
    {\cs_set_protected_nopar:Npn \__sct_wrapper:nn ##1 ##2 {\mkbibparens{##2}}}
    {\cs_set_protected_nopar:Npn \__sct_wrapper:nn ##1 ##2 {\sidenote[][##1]{##2}}}
    {\IfNoValueTF{#3}
      {\__sct_wrapper:nn{#1}{\sidecitehelper[#2]{#4}}}
      {\__sct_wrapper:nn{#1}{\sidecitehelper[#2][#3]{#4}}}}
}
\ExplSyntaxOff

\begin{document}

This,\sidecite[8]{springer} should\autocite{springer} be a side note
\printbibliography 

\end{document}

enter image description here

How can I make \sidecite consistent with \autocite?

1

To make \sidecite consistent with \footcite we can add \bibfootnotewrapper to the wrapper command (originally we removed \mkbibfootnote, but with \bibfootnotewrapper we retain consistency)

\DeclareCiteCommand{\sidecitehelper}[\bibfootnotewrapper]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{cite:postnote}}

I have also changed my original answer to include this modification.

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.