Extra space in citation brackets when in footnote [duplicate]

I'm facing a rather weird problem (at least for me). I'm trying to get the reference in my PhD thesis right, and what I would like is the following:

• citations are displayed as footnotes, and they also appear at the end in a general bibliography;
• the footnote apex is the corresponding number of the reference;
• the reference in the footnote is a shorter version of the one in the general bibliography: name, journal, volume, date (essentially it just lacks the title entry).

I was able to get it right by means of the answer given in https://tex.stackexchange.com/a/20819, reported here:

\documentclass{report}

\usepackage{filecontents}
\begin{filecontents}{biblio.bib}
% biblio.bib
@Article{paper1,
author =       {John Smith},
title =        {A title},
journal =      {A Journal},
year =         {2010}
}
@Article{paper2,
author =       {John Doe},
title =        {A paper},
journal =      {Another journal},
year =         {2009}
}
@Article{paper3,
author =       {Yuppie Networking},
title =        {My paper},
journal =      {The best journal},
year =         {2000}
}
\end{filecontents}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[style=numeric-comp]{biblatex}
\usepackage{manyfoot}

\ExecuteBibliographyOptions{citetracker=true,sorting=none}

% Citation footnotes: use \footnoteA
\DeclareNewFootnote{A}

% Vanilla footnotes: use \footnoteB
\DeclareNewFootnote{B}

% Number of each bibliography entry in brackets
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}

\makeatletter

\newtoggle{cbx@togcite}

% Citation number superscript in brackets
\renewcommand\@makefntext[1]{%
\iftoggle{cbx@togcite}
{\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}
{\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%
\global\togglefalse{cbx@togcite}}

%---------------------------------------------------------------
% Mostly verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{sfcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\global\toggletrue{cbx@togcite}%
\noexpand\footnotetextA[\thefield{labelnumber}]{%

\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{\mkbibbrackets{#1}}%
\cbx@citehook%
\global\let\cbx@citehook=\empty}

\let\cbx@citehook=\empty

%---------------------------------------------------------------

\makeatother

\begin{document}
\chapter{Title}
\null\vfill\noindent
Vanilla footnote.\footnoteB{Vanilla footnote text.}
First citation.\sfcite{paper1}
Second citation.\sfcite{paper2}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
First multi'' citation.\sfcite{paper1,paper3}

\printbibliography
\end{document}


which gives and bibliography

I slightly modified it in order to remove the title from the footnote, by adding:

%avoid displaying the title in the footnote reference.
\AtEveryCitekey{%
\ifentrytype{article}{
\clearfield{title}%
}{}
}


and what I get is indeed what I want, but in the apex of the footnote there is now an extra space before the reference number:

that apparently I am not able to get rid of. Maybe it's just something stupid I'm not seeing, could anyone give me any suggestion?

Thanks,

Fabrizio

• Possibly add a % at the end of \ifentrytype{article}{ and maybe also after }{} – Steven B. Segletes Nov 6 '17 at 12:41
• Thanks, Steven, this totally solves it. It was indeed a stupid thing. – Brizio Nov 6 '17 at 12:43

%avoid displaying the title in the footnote reference.