# "[" in custom cite-command made with \DeclareCiteCommand

For my work i need a custom cite command, which creates a footnote with a custom style. For that i use the \DeclareCiteCommand command:

\DeclareCiteCommand{\xfootcite}[\mkbibfootnote][\unspace]
{\usebibmacro{citeindex}
\setunit{\labelnamepunct}
\printtext{Vgl}
\printnames{author}
\printfield{prenote}
\printfield{year}
{\usebibmacro{postnote}}
}


The footnote itself works, however there is a [ at the beginning of the footnote, which looks like this:

The [ appears when i use [\unspace], however if i remove it, there is an empty row with only a dot in it between the footnotes:

Is there a way to have the footnote without the [ and no empty rows? I'm not working with LaTeX for a long time, so i could not figure it out myself and didn't find any questions like that

• Welcome to TeX - LaTeX! Mar 9 '20 at 8:42
• Try wrapping the \unspace within {} instead of [] (cf. page 176 of the BibLaTeX manual for version 3.14). Please provide a minimal working example, so that suggestions like this can be easily tested. Mar 9 '20 at 9:04
• using {} instead of [] result in the empty rows with dots like in the Question Mar 9 '20 at 9:11

Perhaps you are looking for something like the following

\documentclass{article}

\usepackage{biblatex}

\DeclareCiteCommand{\xfootcite}[\mkbibfootnote]{%
\usebibmacro{citeindex}%
{\printfield{prenote}\setunit{\prenotedelim}}}%
\printfield{year}}%
{\multicitedelim}%
{\usebibmacro{postnote}}

\begin{document}

\xfootcite{westfahl:space}

\xfootcite{angenendt,westfahl:space}

\xfootcite[See][]{westfahl:space}

\end{document}


\DeclareCiteCommand takes five mandatory arguments and only one optional one. Your syntax with [\unspace] looks like a second optional argument, but was being read as the first three mandatory arguments [, \unspace and ]. The spaces in your output were being added by end of line characters, which you need to comment out with % at appropriate places.

I have tried to guess how you might want to use the prenote.

• It works thank you so much :) i was really frustrated because it didn't work for me. but your solution works exactly how i wanted it to be. Mar 9 '20 at 10:11
• I can vote you :-)..It is very ugly that a nice answer have a 0 score. Mar 9 '20 at 11:07
• now i can vote too. i just didn't have enough rep to upvote until now Mar 9 '20 at 11:57