7

How can I display footnote citations with only the citation text without any footnote number (and also remove it in the text). For example, I would like to get the following footnote (MWE follows):


Doe 2013, Public 2013

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{Doe2013,
        title   = {Lorem Ipsum},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Doe},
        year    = {2013},
        pages   = {1--10},
    }

    @article{Public2013,
        title   = {Dolor Sit Amet},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Q. Public},
        year    = {2013},
        pages   = {11--20},
    }
\end{filecontents}

\usepackage[
    style=authoryear-icomp,
    backend=biber
]{biblatex}
\addbibresource{./test.bib}

\begin{document}
    \footcite{Doe2013,Public2013}
\end{document}
Werner
  • 603,163
Lorem Ipsum
  • 145
  • 1
  • 3

1 Answers1

5

One way to do it is to redefine the \blx@mkbibfootnote command that is defining citation in footnote. You can the use a modified version of the \footnote command, with no number.

Redefinition of the \footnote command:

\newcommand\footnotenonun[1]{%
  \begingroup
  \renewcommand\thefootnote{}\footnote{#1}%
  \addtocounter{footnote}{-1}%
  \endgroup
}

Redefinition of the \blx@mkbibfootnote command:

\makeatletter
\renewrobustcmd{\blx@mkbibfootnote}[2]{%
  \iftoggle{blx@footnote}
    {\blx@warning{Nested notes}%
     \addspace\mkbibparens{#2}}
    {\unspace
     \ifnum\blx@notetype=\tw@
       \expandafter\@firstoftwo
     \else
       \expandafter\@secondoftwo
     \fi
       {\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}}
       {\csuse{footnotenonum#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}}
\makeatother

The good point is that it won't interfeer with footnote numbering if you use the "normal" \footnote command. Of course, if you want all your footnotes without number, you can \renewcommand the \footnote command instead of creating a new one.

MWE:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{Doe2013,
        title   = {Lorem Ipsum},
        volume  = {1},
        journal = {J. Foo},
        author  = {J. Doe},
        year    = {2013},
        pages   = {1--10},
    }
@article{Public2013,
    title   = {Dolor Sit Amet},
    volume  = {1},
    journal = {J. Foo},
    author  = {J. Q. Public},
    year    = {2013},
    pages   = {11--20},
}

\end{filecontents}

\usepackage[ style=authoryear-icomp, backend=biber ]{biblatex} \addbibresource{\jobname.bib}

\newcommand\footnotenonum[1]{% \begingroup \renewcommand\thefootnote{}\footnote{#1}% \addtocounter{footnote}{-1}% \endgroup }

\makeatletter \renewrobustcmd{\blx@mkbibfootnote}[2]{% \iftoggle{blx@footnote} {\blx@warning{Nested notes}% \addspace\mkbibparens{#2}} {\unspace \ifnum\blx@notetype=\tw@ \expandafter@firstoftwo \else \expandafter@secondoftwo \fi {\csuse{blx@theendnote#1}{\protecting{\blxmkbibnote{end}{#2}}}} {\csuse{footnotenonum#1}{\protecting{\blxmkbibnote{foot}{#2}}}}}} \makeatother

\begin{document} \footcite{Doe2013,Public2013} test\footnote{test}, test\footnotenonum{test2}, test\footcite{Doe2013} \end{document}

Output: Obtained after running pdflatex test.tex (there are BibTeX warnings, one may launch biber test then rerun pdflatex test.tex but it works however).

enter image description here

enter image description here

MBR
  • 1,347
  • It removes the citation number, but it's no longer a footnote... It's cited in the main body. – Lorem Ipsum Oct 14 '13 at 14:14
  • I added the MWE I used to test it, and the resulting output. – MBR Oct 14 '13 at 14:22
  • The MWE doesn't answer the question. It literately prints Doe2013 and does not cite the article properly. – M0M0 Jun 08 '21 at 06:33
  • You have to run biber after the first latex run to get the proper result (which is different from the shown output.) – M0M0 Jun 08 '21 at 06:44
  • Can you be more specific? I've just retried and everything is still working (as it was 8 years ago). A quick'n'dirty test (just running pdflatex test.pdf is giving the output I gave at the time. I don't remember getting the BibTeX warning -- now I do have it to -- but runnng biber and re-running pdflatex I get almost the same output (no bold on references, that's all). I guess I had assume people reading the answer would have some familiarity with LaTeX/BibTeX; I'll add the commands to get the ouptut in the text. – MBR Jun 14 '21 at 11:58
  • The bold output means that the citations weren't found. But at least on my machine that is only due to the file name mismatch between \begin{filecontents}{\jobname.bib} and \addbibresource{./test.bib}. If the file name happens to be test.tex things work, but to make the file universally usable \begin{filecontents}{\jobname.bib} and \addbibresource{\jobname.bib} would be more appropriate. With that changed the MWE does exactly what it is supposed to do. – moewe Jun 14 '21 at 18:53
  • Ah right for the bold citations, I forgot about that, thanks for pointing it out. Thank you also for the suggestion; I changed de MWE accordingly. – MBR Jun 15 '21 at 08:56