9

I'm using biblatex with the autocite=superscript option, so I can use \autocite to switch the interpunction and a superscript citation when the \autocite command is placed before an period or comma. I'd like to move the citation closer to or above the interpunction.

What I want to achieve is shown at the second half of the page: http://www.khirevich.com/latex/footnote_citation/

The solution given on the page consist of a new command that takes both the citation as well as the interpunction as an argument:

\newcommand{\sjcitep}[2][]{%       new command with two arguments: optional (#1) and mandatory (#2)
    \settowidth{\spc}{#1}%         set value of \spc variable to the width of #1 argument
    \addtolength{\spc}{-1.8\spc}%  subtract from \spc about two (1.8) of its values making its magnitude negative
    #1%                            print the optional argument
    \hspace*{\spc}%                print an additional negative spacing stored in \spc after #1
    \supershortnotecite{#2}}%      print (cite) the mandatory argument

Is it possible to change the \autocite command such that it inserts a \hspace like in the code above between the interpunction and the superscript whenever it puts the superscript behind an interpunction character?

Werner
  • 603,163
spkersten
  • 193

1 Answers1

6

The fnpct package was developed for comfortably changing interaction with punctuation and footnote marks. By default biblatex's commands are not adapted, but fnpct offers commands to adapt them manually. See section 8 of the manual for details and impacts.

\documentclass{scrartcl}
\usepackage{fnpct}
\usepackage[autocite=superscript]{biblatex}
\addbibresource{biblatex-examples.bib}
\AdaptNoteOpt\autocite\multautocite

\begin{document}
Without \texttt{fnpct:}

\begingroup\setfnpct{dont-mess-around}
Text\autocite{companion,knuth:ct}. Other text\autocite{companion}, and now
further text. This time we prevent switching\autocite*{knuth:ct:a}.
\endgroup
\bigskip

With \texttt{fnpct}

Text\autocite{companion,knuth:ct}. Other text\autocite{companion}, and now
further text. This time we prevent switching\autocite*{knuth:ct:a}.

\end{document}

enter image description here

cgnieder
  • 66,645