3

I have written a little essay and tried to add a bibliography. I get all kinds of errors and searched the last 5 hours for solutions, only to find out how little I know about latex...

I am using Miktex and Texmaker. I made a simple version of my .tex file to post here:

\documentclass[]{article}
\usepackage[autostyle]{csquotes}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{biblatex}
\addbibresource{referenzen}

\begin{document} \section{Introduction} Lorem ipsum \cite{dirac} \printbibliography \end{document}

Bib file:

@article{valueSensitiveDesign,
    author = {Friedman, Kahn et al},
    title = {Value Sensitive Design},
    year = "2008"
}

@book{dirac, title = {The Principles of Quantum Mechanics}, author = {Paul Adrien Maurice Dirac}, isbn = {9780198520115}, series = {International series of monographs on physics}, year = {1981}, publisher = {Clarendon Press}, keywords = {physics} }

@article{Lee2009a, author = {Lee, Geun}, journal = {The Korean Journal of Defense Analysis}, number = {2}, pages = {205--218}, title = {{A Theory of Soft Power and Korea's Soft Power Strategy}}, volume = {21}, year = {2009} }

I've setup Texmaker to do 'pdflatex > show pdf'. But then the bibliography is not printed. I researched this and people say that you need to 'latex > biblatex > latex 2x > show pdf', but I don't have that. I have similar options, but the I get the error:

This is BibTeX, Version 0.99d (MiKTeX 20.6.29) The top-level auxiliary file: prototype.aux I found no \citation commands---while reading file prototype.aux I found no \bibdata command---while reading file prototype.aux I found no \bibstyle command---while reading file prototype.aux (There were 3 error messages)

Texmaker doesn't seem to give me an option to do it the correct way (and this gets way to complicated for me). Here is a screenshot of my configuration options (sorry it's in German):

enter image description here

My problem seems to be so simple, but I feel like a need to do a full latex tutorial to get any idea what I m doing. I feel like there might be some conflicting packages. Can anyone please explain whats going on here?

pluton
  • 16,421
  • you need to run biber in between. See here how to setup texmaker to use biber: https://tex.stackexchange.com/questions/154751/biblatex-with-biber-configuring-my-editor-to-avoid-undefined-citations/154788#154788 – Ulrike Fischer Aug 10 '20 at 16:55
  • 1
    You must give the file name of your .bib file with file extension in \addbibresource. So *\addbibresource{referenzen} should quite probably be \addbibresource{referenzen.bib}. Other than that, Ulrike is right, your editor appears to be configured to run BibTeX, but you need Biber, see https://tex.stackexchange.com/q/154751/35864. – moewe Aug 10 '20 at 16:59
  • If your bibliography-related formatting requirements are fairly basic, it may suffice to change \usepackage{biblatex} to \usepackage[backend=bibtex]{biblatex} and to select the second option from the drop-down menu. – Mico Aug 10 '20 at 17:00
  • 2
    It shouldn't cause an error, but *author = {Friedman, Kahn et al}, is bad input. Ideally you would give all authors and separate names with and: author = {Batya Friedman and Peter H. Kahn and Alan Borning}, (not sure if that is the same paper). You should also look into adding more bibliographic data to the entry. If valueSensitiveDesign is really an @article, it should have a journal, volume and pages field. It may also have a doi. – moewe Aug 10 '20 at 17:04
  • @UlrikeFischer Thank you so much ... it seems to work now ... – Paul Erlenmeyer Aug 10 '20 at 17:07
  • @moewe Yes, thank you! It worked after following Ulrike's suggestion and appending .bib to 'referenzen'. – Paul Erlenmeyer Aug 10 '20 at 17:08
  • @Mico It worked now with the suggestion from Ulrike. But biber is the more advanced 'method' of bibtex? Because for now all my latex usages are fairly basic – Paul Erlenmeyer Aug 10 '20 at 17:10
  • 1
    Just to emphasize the importance of @moewe's comment about the author field of the valueSensitiveDesign entry: author = {Friedman, Kahn et al} won't throw an error message, but it's wrong nevetheless, as the field will get parsed as having an author with surname Friedman and given name Kahn. In author and editor fields, the keyword and, not the comma symbol, is used to separate individual authors. – Mico Aug 10 '20 at 17:11
  • @moewe Thanks for the .bib suggestion. That was just me beeing frustrated and adding as little information as I could find... – Paul Erlenmeyer Aug 10 '20 at 17:11
  • 1
    @Mico Thanks a lot, I'll fix it right now – Paul Erlenmeyer Aug 10 '20 at 17:13
  • 1
    biber is definitely far more versatile than bibtex. (backend=biber is the default.) But if your inputs are all ASCII-encoded and you don't need to modify some fairly basic style, BibTeX will do OK too. – Mico Aug 10 '20 at 17:13
  • 1
    If you can get Biber to work, use Biber. Only Biber gives you access to all of biblatex's features. BibTeX can still be used with biblatex, but that is only considered legacy support. There is practically no advantage in using BibTeX over Biber, if you can get Biber to work (as you did). – moewe Aug 10 '20 at 17:18
  • @moewe Alright got it. Thank you very much! – Paul Erlenmeyer Aug 10 '20 at 17:28
  • 1
    Well, to be fair there is one advantage of BibTeX: It's usually quite a bit faster than Biber. (It has fewer features, so it takes less time to process a file.) But unless you explicitly run your bibliography tool every time you compile (which would usually be superfluous), you probably won't notice that. – moewe Aug 10 '20 at 17:31

1 Answers1

0

You need to define biblatex backend either bibtex or biber as displayed below and it works well. I advice you to give Texstudio a try. Good Luck.

\documentclass[]{article}
\usepackage[autostyle]{csquotes}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{referenzen.bib}

\begin{document} \section{Introduction} Lorem ipsum \cite{dirac}

\printbibliography \end{document}

  • 1
    It is not necessary to use the backend option. If it is not given, biblatex will assume backend=biber,. What is necessary, however, is to adapt your workflow (either manual compilations or editor settings) to the backend you chose. Most editors are preset to run BibTeX, so if you want to use backend=biber, you often need to configure your editor accordingly: https://tex.stackexchange.com/q/154751/35864 – moewe Aug 11 '20 at 15:06
  • From the biblatex side it should not be necessary to declare backend=biber, if you want Biber as that is the default. If for some reason TeXstudio needs that to detect the right bibliography tool, then that might be something to alert the developers about. But you say that you manually select the backend anyway, so I don't see a reason why backend=biber, would be needed. Cleaning the aux files should not be needed when switching from Biber to BibTeX (or vice versa), but it doesn't do a lot of harm either. – moewe Aug 11 '20 at 18:19
  • Actually, I am using Texstudio and unfortunately it is required to use backend=bibtex or if you need to use biber, then use backend=biber and before compiling, clean up auxiliary files and change bibliography tool from bibtex to biber from Texstudio Build option. – Abdelsalam H. M. Abdelaziz Aug 11 '20 at 18:25
  • Yes, it may be Texstudio way of doing – Abdelsalam H. M. Abdelaziz Aug 11 '20 at 18:30