1

Currently I'm using biblatex (with biber as back-end). I'm using \parencite{} or \textcite{} to create references.

I would like to know, if it is possible create footnotes (with number reference) for certain entry-types such as @online or @booklet instead of adding them to the Bibliography. In addition to that would it also possible to customize the text of the footnote in a certain pattern, e.g., title + url + urldate.

Update: Here is the latex code and how my bib file looks like:

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, defernumbers, backend=biber]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{book1,
  author       = "Max Mustermann",
  title        = "My Book",
  date         = "1980",
  isbn         = "123456789",
}

@booklet{online1,
  author       = "John Doe",
  title        = "Title of Online Reference",
  url          = "http://www.online-resource.com",
  howpublished = "XYZ",
  urldate      = "2019-05-04",
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
Reference book \parencite{book1}. \\
I want footnotes for online resources like that \footnote{John Doe. \textit{Title of Online Reference}. http://www.online-resource.com (accessed 04.05.2019)} instead of \parencite{online1}.

\printbibliography
\end{document}

Result

I want to create a footnote with the values from the bib-entry, e.g.\addfootcite{online1} should create the footnote shown in the result but not add them to the Bibliography.

  • What do you mean by footnotes (with number reference)? Just a normal footnote and its footnote number or do you have something more fancy in mind that would allow you to re-use a footnote number of refer back to earlier footnotes? Maybe you could share with us what you have so far (a so-called MWE: tex.meta.stackexchange.com/q/228/35864) and tell us in more detail what you are after. – moewe May 4 at 6:20
  • In theory it is possible to demote certain references to the footnote while others get a 'normal' reference style, but there are some tricky challenges w.r.t. the implementation there in case it comes to multiple citations. – moewe May 4 at 6:21
  • Would i possible to create a latex command which extract data vom a bib entry such as title, URL and date and add them to a footnote? – Clemens May 4 at 9:47
  • That should be possible, yes. But I can only offer more concrete advice if you can show us an example document with what you have so far and what you have in mind. – moewe May 4 at 9:53
  • @moewe I updated my question, hope it is more clearer now. – Clemens May 4 at 11:04
0

You can define new \...cite commands with \DeclareCiteCommand. Usually the main part of the definition of such a command lives in a bibmacro.

While it may be desirable to have a unified citation command for all citations that would automatically choose what to do based on the entry types, I went for a more manual solution where you force a particular output by means of using a different \...cite command. The unified \...cite command would be quite a bit harder to implement, because it would have to deal with multiple citations of different types gracefully. That would require a pre-processing step before the actual citation processing.

The new command here shows fewer details than \footfullcite would show. Since the entries cited with the new command do not appear in the bibliography, it might have been useful to show more details, but you can customise the exact output in the bibmacro.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, defernumbers, backend=biber]{biblatex}
\usepackage{hyperref}

\newbibmacro{semifullcite}{%
  \printnames{labelname}%
  \setunit{\printdelim{nametitledelim}}%
  \printfield[citetitle]{labeltitle}%
  \newunit
  \usebibmacro{url+urldate}}

\DeclareBibliographyCategory{nobib}

\DeclareCiteCommand{\nobibsemifullfootcite}[\mkbibfootnote]
  {\usebibmacro{prenote}}
  {\addtocategory{nobib}{\thefield{entrykey}}%
   \usebibmacro{semifullcite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{book1,
  author       = {Max Mustermann},
  title        = {My Book},
  date         = {1980},
  isbn         = {123456789},
}
@booklet{online1,
  author       = {John Doe},
  title        = {Title of Online Reference},
  url          = {http://www.online-resource.com},
  howpublished = {XYZ},
  urldate      = {2019-05-04},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Reference book \parencite{book1}.

I want footnotes for online resources like that\nobibsemifullfootcite{online1}.

\printbibliography[notcategory=nobib]
\end{document}

Numeric citation for book1, a footnote for <code>online1</code>. The bibliography only contains <code>book1</code>.

For captions, it may help to use the standard \footnotemark\footnotetext approach explained in Using \footnote in a figure's \caption

\DeclareCiteCommand{\nobibsemifullfootcitetext}[\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\addtocategory{nobib}{\thefield{entrykey}}%
   \usebibmacro{semifullcite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

Then use \footnotemark\nobibsemifullfootcitetext{sigfridsson} as in

\begin{figure}
  \centering
  \includegraphics{foo}
  \caption[Caption for LOF]{Real caption\footnotemark}
\end{figure}

Anywhere on the same page where the float appears\nobibsemifullfootcitetext{sigfridsson}
  • Thank you very much. I have two more questions: First, is it possible to change the date format and second, is it possible to change the command it also work inside captions? For example: \begin{figure}[tp] \centering \includegraphics{image.jpg} \caption[Caption] { Caption text with footnote \nobibsemifullfootcite{online1}. } \label{fig:image} \end{figure} – Clemens May 4 at 16:05
  • @Clemens Yes, you can change the date format. What do you have in mind? The captions are trickier: LaTeX in general has issues with footnotes in captions. See for example tex.stackexchange.com/q/10181/35864. The best I can offer is a \footnotetext version of the command for \footnotemark-\footnotetext. – moewe May 4 at 16:10
  • I would like to change the format to DD.MM.YYY if possible. I also encounter another thing: Citing something multiple times will create a new footnote. Is it possible to refer to the already created footnote, instead of creating a new one? – Clemens May 4 at 16:26
  • @Clemens Re the date: Do you write your document in British English as in the MWE? If so, I suggest you ask a new question about the date format. Re the footnote: It should be possible, but is quite a lot harder than what has been done here. Plus you'd probably only want to re-use footnotes on the same page so a reader does not have to track back footnotes from pages ago in case you cite something again much later. All in all I'd say that would also be a new question and I doubt it is worth the effort. (Similar things have been done before of course, ...) – moewe May 4 at 16:39

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.