11

When using the \footcite commands with biblatex, it is not clear how the separating commas in the text should be handled. For instance, \footcite{key1},\footcite{key2} will be problematic in the text because of a normal comma separating two exponents. Intead, \footcite{key1}\textsuperscript{,}\footcite{key2} should be preferred but looks problematic. What is the right way to achieve the expected result?

7
  • Isn't \footcite{key1,key2} working?
    – cgnieder
    Jul 13 '13 at 0:18
  • @cgnieder no, it places the two references on the same line in the footnotes, which I want to avoid.
    – pluton
    Jul 13 '13 at 0:22
  • You should probably add an MWE together with a description of what you do want to get.
    – cgnieder
    Jul 13 '13 at 8:02
  • @cgnieder please have a look at MarcoDaniel's example.
    – pluton
    Jul 13 '13 at 15:01
  • 2
    I think what you want is \usepackage[autocite=superscript]{biblatex} and then use \autocite{key1,key2}. I added another answer using a different method anyway...
    – cgnieder
    Jul 13 '13 at 15:29
12

The fnpct package can be used for this. While its primary purpose is another one it also can handle multiple \footcite commands provided \footcite is added to fnpct's known commands. The example below is shamelessly borrowed from Marco Daniel's answer. Note that the code below is for fnpct version 1.0 (released January 2021).

\documentclass{article}
\usepackage[style=authortitle,dashed=false]{biblatex}
\addbibresource{biblatex-examples.bib}

\usepackage{fnpct}
\AdaptNote\footcite{oo+m}[footnote]{%
  \setfnpct{dont-mess-around}%
  \IfNoValueTF{#1}
    {#NOTE{#3}}
    {\IfNoValueTF{#2}
       {#NOTE[#1]{#3}}
       {#NOTE[#1][#2]{#3}}}}


\begin{document}
Text\footcite{knuth:ct:a}

Text\footcite{knuth:ct:b}\footcite{ctan}


Text\footcite{knuth:ct:c}\footcite{companion}\footcite{knuth:ct:d}

Text\footcite{knuth:ct:a}\footcite{knuth:ct:b}\footcite{knuth:ct:c}\footcite{knuth:ct:d}\footcite{companion}

\printbibliography

\end{document}

enter image description here

enter image description here

6
  • Something wrong happens when you have add a period at the end of the sentence: Text\footcite{knuth:ct:b}\footcite{ctan}.
    – pluton
    Jan 22 '16 at 20:44
  • 1
    @pluton either use \setfnpct{punct-after} or \setfnpct{dont-mess-around} or have a look at the fnpct documentation for further options…
    – cgnieder
    Jan 22 '16 at 21:16
  • However, if each footcite command is placed on a seperate line no punctuation marks are palced, is there a way ot of that, I need to place footcites command after each other but each one on a seperate line and not all commands on same line
    – Silva
    Feb 26 '20 at 11:59
  • @Silva yes. The end of a line is treated by TeX like a space so placing them on different lines is like \footcite{...} \footcite{...} where you will notice the same. Hide the end of the line by commenting it: \footcite{...}%
    – cgnieder
    Feb 26 '20 at 17:22
  • @cgnieder, is there a way to use "fnpct" package instead of "footnoterange"package, I need an alternative to resolve this issue tex.stackexchange.com/questions/531313/…
    – Silva
    Mar 7 '20 at 0:20
6

I don't know a way using biblatex but I can suggest a self defined command:

\documentclass{article}
\usepackage[style=authortitle,dashed=false]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{xparse}
\ExplSyntaxOn
\clist_new:N \l__pluton_input_clist
\NewDocumentCommand \myfootcite { m  }
 {
   \int_compare:nNnTF
    { \clist_count:n { #1 } } > { 1 }
    { \__pluton_myfootcites:n { #1 } }
    { \footcite { #1 } }
 }
\cs_set:Npn  \__pluton_myfootcites:n #1 
 {
  \clist_set:Nx \l__pluton_input_clist { #1 }
  \int_case:nnn { \clist_count:N \l__pluton_input_clist }
     {
       { 0 } { \footnote{\bfseries empty~argument} }
       { 1 } { \footcite{ \clist_item:Nn \l__pluton_input_clist { 1 } } }
       { 2 } { \footcite{ \clist_item:Nn \l__pluton_input_clist { 1 } }
                \textsuperscript{,}
                \footcite{ \clist_item:Nn \l__pluton_input_clist { 2 } } }
     }
     {
       \footcite{ \clist_item:Nn \l__pluton_input_clist { 1 } }
       \textsuperscript{,}
       \clist_pop:NN  \l__pluton_input_clist \l_tmpa_tl
       \__pluton_myfootcites:n { \l__pluton_input_clist }
     }
 }

\ExplSyntaxOff

\begin{document}
Text\myfootcite{knuth:ct:a}

Text\myfootcite{knuth:ct:b,ctan}


Text\myfootcite{knuth:ct:c,companion,knuth:ct:d}

Text\myfootcite{knuth:ct:a,knuth:ct:b,knuth:ct:c,knuth:ct:d,companion}

\printbibliography

\end{document}

enter image description here

6
  • That's nice. Isn't it doable with biblatex?
    – pluton
    Jul 13 '13 at 15:01
  • @pluton: What do you mean? It works with biblatex. Jul 13 '13 at 15:41
  • yes, sorry but you said: "I don't know a way using biblatex"?
    – pluton
    Jul 13 '13 at 16:31
  • @pluton: yes. But I meant the definition of the macro. So I used expl3. Jul 13 '13 at 18:32
  • 1
    @pluton It is possible, but the context-sensitive trackers update on the assumption that the whole citation list is either inside the same footnote or inline. So unless you don't use any of the trackers or you want something fancy like suppression of recurrent footnotes or compact footnote mark lists, a fully biblatex approach is too messy to be worth all the trouble.
    – Audrey
    Jul 13 '13 at 19:40
4

If you want references to be placed on separate lines in footnotes, consider to redefine \multicitedelim so that it will add a linebreak if (and only if) the citation command produces footnotes.

\documentclass{article}

\usepackage[style=authortitle]{biblatex}

\renewcommand*{\multicitedelim}{\iffootnote{\newline}{\addsemicolon\space}}
\renewcommand{\bibfootnotewrapper}[1]{\bibsentence #1}

\usepackage{scrextend}
\deffootnote{1.7em}{1em}{\textsuperscript{\thefootnotemark}}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\null\vfill% just for the example

Some text \parencite{A01,B02}.

Some text.\footcite{A01,B02}

\printbibliography

\end{document}

enter image description here

1
  • Interesting but for some reason I think that what @MarcoDaniel suggests is very similar to what we find in correctly typed books? In your example, there are two distinct references, which should be reflected in the text by two exponents.
    – pluton
    Jul 13 '13 at 15:00

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.