3

What is the full procedure of using biblatex? I have been active here only for a short time and I have already seen a lot of people struggle with different stages of biblatex. And most of the time the issue is something that the author does incorrectly which involves biblatex compilation. So here I will give a complete answer to this.

I do not go through some intermediate steps like generating .bbl files because LaTeX will take care of that automatically so you need not be worried about it.

Masum
  • 1,009
  • 2
    Relevant related questions https://tex.stackexchange.com/q/13509/35864, https://tex.stackexchange.com/q/154751/35864, https://tex.stackexchange.com/q/5091/35864, https://tex.stackexchange.com/q/25701/35864. – moewe Oct 02 '20 at 15:22

1 Answers1

2
  • use \usepackage{biblatex} in the preamble
  • Make biber default bibtex compiler in your editor
  • load bibliography information in a separate file, say ref.bib
  • add your bibliography resource in the preamble with \addbibresource{ref.bib} or \bibliography{ref}. As pointed out in a comment, apparently MikTeX and TeXLive handles filenames differently. So with \bibliography it's probably safer to use {ref} than {ref.bib}
  • put \printbibliography where you want it printed
  • Make sure your compilation is as follows:

default compiler -> biber -> default compiler -> default compiler -> view pdf

Note that you have to run the default latex compiler twice after running biber. The default compiler can be pdflatex or xelatex, your choice. You should be able to edit your default compiler in your editor. The best editor in my opinion is TexStudio. You can add the series of commands there. Here is how you can do the whole thing automatically using TexStudio.

Latex Pipeline in TexStudio

Here is a minimum working example.

\documentclass[a4paper, 12pt]{article}

\usepackage{amsfonts, amssymb, amsmath, amsthm}

\usepackage{biblatex}

\addbibresource{ref.bib}

\begin{document} Here is the reference to \textcite{holder_1889}. And here is the reference to \textcite{bouniakowsky_1859}.

\printbibliography

\end{document}

The file ref.bib contains the following:

    @article{bouniakowsky_1859, series={7}, title={Sur quelques in\'{e}galit\'{e}s concernant les int\'{e}grales ordinaires et les int\'{e}grales aux diff\'{e}rences finies}, volume={1}, number={9}, journal={M\'{e}moires de l’Acad. de St.-P\'{e}tersbourg}, author={Bouniakowsky, V.}, year={1859}, pages={1–18}, collection={7}}

@Article{holder_1889, Author = {O. {H"{o}lder}}, Title = {{Ueber einen Mittelwertsatz}}, FJournal = {{Nachrichten von der K"{o}niglichen Gesellschaft der Wissenschaften und der Georg-Augusts-Universit"{a}t zu G"{o}ttingen}}, Journal = {{G"{o}tt. Nachr.}}, Volume = {1889}, Pages = {38--47}, Year = {1889}, Publisher = {Dieterich, G"{o}ttingen}, Language = {German}, Zbl = {21.0260.07} }

Note: if you do not use \printbibliography no citation will be printed but the citations will be used in the document. Also, if you want to print the citations which were not referenced in the document, you have to use \nocite{*}. Here, you can replace * by a specific bibliography entry. Using * will print all the non-referenced bibliography. Here is the output.

Output

Masum
  • 1,009
  • 1
    You are writing \bibliography in the steps but show (the better) \addbibresource in the example. – Ulrike Fischer Oct 02 '20 at 09:11
  • added both in the answer because both work – Masum Oct 02 '20 at 09:15
  • 4
    also there is no reason here to use an example using non standard fonts that most people will have nor to use the excessive fake bold 3 \setmathfont{latinmodern-math.otf}[FakeBold=3] that I used in an earlier answer just to highlight the effect. Probably half of your example is unrelated to the biblatex question and makes the example unusable in pdflatex and not usable for anyone who has not aquired the fonts. – David Carlisle Oct 02 '20 at 13:31
  • 1
    Technically speaking \bibliography{ref.bib} should be \bibliography{ref} since \bibliography (unlike \addbibresource) takes the file name of the .bib file without the .bib file extension. The line with the superfluous .bib will work on many current systems, but this is not guaranteed and nothing to rely upon. (Just to avoid any doubt: \addbibresource needs the file extension, so \addbibresource{ref.bib} is correct.) – moewe Oct 02 '20 at 13:36
  • font portion was removed. as for what @moewe said, as far as I know, the extension .bib is optional in LaTeX. The more accurate one is using ref.bib regardless of what you use. LaTex is smart enough to get the file without the extension but it is safer this way (and not just for bib files, for pretty much any file like image or pdf). Just to confirm, I reran the code with \bibliography{ref.bib} and like I said, it compiled like it is supposed to. – Masum Oct 02 '20 at 14:41
  • 1
    I don't want to say anything about other commands and places where you input a file name, but traditionally BibTeX has always added the .bib file extension to the file names given in \bibliography when it tries to open them (see https://github.com/TeX-Live/texlive-source/blob/05b95467a0001b7fa7474dbbbae7669a2c51b751/texk/web2c/bibtex.web#L2907). So if you typed in ref.bib it would try to open ref.bib.bib. TeX live's BibTeX has accepted a superfluous .bib extension for quite a while, but MikTeX only recently started doing that (https://github.com/MiKTeX/miktex/issues/541). ... – moewe Oct 02 '20 at 15:18
  • ... So I strongly recommend using the correct form without the .bib file extension even if the big two current TeX systems support adding the extension. – moewe Oct 02 '20 at 15:19
  • I use TeXLive so it probably works for me anyway. But just to be safe, I will add your comment. – Masum Oct 02 '20 at 17:37