4

It is the first time that I use bibliography in a document and after a brief search, I realised that this is was done with BibTeX which was succeeded by BibLaTeX. This is a sample of my document.

\usepackage[backend=biber, style=ieee]{biblatex}
\addbibresource{../references.bib}


\title{Related Work}


\begin{document}
\maketitle

This is some text and this is a reference \cite {art1}.

\printbibliography

\end{document}

What I get is

enter image description here

which is the text inside the braces of \cite with bold where normally should be the citation and no References at the and of the document at all. I also get errors of undefined citation and empty bibliography. I searched that and I found that BibLaTeX uses a different backend machine, biber, which is not invoked.

Here: Biblatex with Biber: Configuring my editor to avoid undefined citations and in many other answers suggested adding this

% !BIB TS-program = biber

as the first line of the document, so that LaTeX uses the right backend machine for this document, even though the default may be different.

Since this hasn't work, are there any other suggestions? Also if possible, can someone explain a bit further about the whole situation?

4
  • 4
    Welcome to TeX SX! But did you run the cycle pdflatex -> biber -> pdflatex (twice) ? Also (just in case); was your file utf8-encoded?
    – Bernard
    Jul 28, 2019 at 22:07
  • If you will only use biber then change the default BibTeX engine (in the Engines panel of the preferences) to biber.
    – Alan Munn
    Jul 28, 2019 at 22:17
  • tex.stackexchange.com/q/63852/35864 explains why you need to run Biber (the answer was written with BIbTeX in mind, but it's really the same). tex.stackexchange.com/q/25701/35864 shortly discusses the differences between BibTeX and Biber. tex.stackexchange.com/q/5091/35864 explains what you need to do to switch from BibTeX to biblatex in general.
    – moewe
    Jul 29, 2019 at 4:49
  • 1
    Have a look at tex.stackexchange.com/q/286706/35864, please. Delete all temporary files (.aux, .bbl, .bcf, ...) and then recompile the document from scratch with the cycle LaTeX, Biber, LaTeX, LaTeX (where LaTeX can be your favourite LaTeX flavour: pdfLaTeX, XeLaTeX, LuaLaTeX, ...). If you get any error at any point: Resolve the error, delete all temporary files, start again. If you get an error you can't resolve, upload the .log and .blg files.
    – moewe
    Jul 29, 2019 at 4:50

1 Answer 1

3

Bernard's suggestion is the way to do it, compile the document, then run biber and again the document (I didn't do anything about the encoding).

I found two ways to achieve that in TeXShop:

either next to the typeset button, choose pdflatexmk and with a single typeset the document is ready

enter image description here

enter image description here

or without changing anything from the typeset menu, inserting this % !BIB TS-program = biber command as the first line of the document and then typeset the document, run biber Cmd + Shift + B and then again typeset. This command basically, changes for the specific document the engine from BibTeX to biber, because the default is BibTeX.

enter image description here

A way to understand that biber hasn't run is that before compiling biber I didn't get any .bbl and .blg files.

8
  • I'm not familiar with TeXShop, but usually you need to tell your editor to run the bibliography tool (BibTeX or Biber) explicitly. Some editors may run tools like texify or latexmk that automatically detect whether or not Biber needs to be run or will always execute the same hard-coded compilation sequence, but with some editors you have to explicitly run LaTeX and BibTeX/Biber. Maybe TeXShop is one of those more manual editors?
    – moewe
    Jul 29, 2019 at 16:28
  • From what I understand from this Biblatex with Biber: Configuring my editor to avoid undefined citations TeXShop should also invoke bieber using % !BIB TS-program = biber command. Jul 29, 2019 at 21:24
  • That command should certainly tell TeXShop to run Biber instead of BibTeX as the bibliography tool of your choice. But I'm not quite sure if TeXShop runs the bibliography tool (Biber) automatically for you. In fact the screenshots and other descriptions of TeXShop that I have seen so far make me suspect you have to explicitly invoke the bibliography tool when you want it to be run: TeXShop does not appear to run it automatically. (Your experience would confirm that.) tex.stackexchange.com/q/51499/35864 explicitly says to choose BibTeX in the dropdown menu.
    – moewe
    Jul 29, 2019 at 21:28
  • Note that the answer you cite says Now the command is accessed in the same way that you would access bibtex: from the Typeset Menu choose Bibtex (Command-Shift-B). This too seems to suggest that you need to run the bibliography tool explicitly. Later the answer talks about one-stop-solutions Alternatively, if you prefer an all-in-one command solution, you can use one of the various latexmk Engines that TeXShop provides.
    – moewe
    Jul 29, 2019 at 21:29
  • I figured it out how to do it and I posted it on the answer. Thnx a lot @moewe . Jul 30, 2019 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .