I defined a custom name + year + title footnote format, but for some reason there is a leading space before the superscript. Where is it coming from?
The command looks like this:
\DeclareNameFormat{lastnameonly}{\namepartfamily}
\DeclareCiteCommand{\myfootcite}{}{%
\footnote{%
\printnames[lastnameonly]{author} (\printfield{year}), \printfield{title}
}
}{}{}
Output:
MWE:
\documentclass{article}
\usepackage[backend=biber]{biblatex}
\bibliography{references.bib}
\begin{filecontents}{references.bib}
@article{smith01,
author = {Smith, John},
year = {2001},
title = {Article title}
}
\end{filecontents}
%% Custom command giving a mysterious space
\DeclareNameFormat{lastnameonly}{\namepartfamily}
\DeclareCiteCommand{\myfootcite}{}{%
\footnote{%
\printnames[lastnameonly]{author} (\printfield{year}), \printfield{title}
}
}{}{}
\begin{document}
There is a space \myfootcite{smith01}
\end{document}
\myfootcite
;-)\footcite
deletes the preceding space then, and how to do that for my command with\footnote
?\unskip
at the beginning of\myfootcite
.