9

I am trying to include the bibliography in a file I'm writing. The editor I'm using is TeXShop (OS is mac OSX).

I'm following a tutorial where I found that to include the bibliography using Biber I need a .bib file and the following commands:

\usepackage[autostyle]{csquotes} 
\usepackage[backend=biber]{biblatex}
\addbibresource{bib_file.bib}

and then

\printbibliography

Then it says that, in order to make the bibliography appear in the document, I should:

  • Compile
  • Run Biber from the editor
  • Re-compile twice

But how do I run Biber from TeXShop?

PS I've already set Biber as my default BibTeX Engine in Preferences/Engine, but I don't know how to run it. If I simply compile the document (i.e. press "Typeset") no bibliography will appear.

valerio
  • 641

1 Answers1

7

Assuming you have the .bib file place the line

% !TEX TS–program = pdflatexmk

at the top of your .tex file. Then typeset using Typeset->Typeset (Cmd-T). That will automatically run biber when necessary and all the necessary runs of pdflatex.

If you want to create a .bib file try using BibDesk which you can find in /Applications/TeX.

If you always will use biber you can also make it the default bibtex engine in TeXShop->Preferences->Engine.

Herb Schulz
  • 3,410
  • It works. But could I ask what does this command do exactly? – valerio Aug 05 '16 at 22:51
  • 2
    That `command', called a directive, tells TeXShop to use one of the special processing engines. The pdflatexmk engine uses the latexmk pearl program to use pdflatex then bibtex or biber (automatically) and make index, if necessary, finishing off with the proper number of runs of pdflatex to resolve all cross references. See Help->TeXShop Tips and Tricks for more information. – Herb Schulz Aug 05 '16 at 23:08
  • 1
    @HerbSchulz Is there a difference between pdflatex and pdflatexmk when called for TexShop? – Jim May 08 '22 at 03:45
  • 2
    @Jim : pdflatex simply runs pdflatex once while pdflatexmk uses the latexmk perl script to automatically completely typeset your document resolving all cross-references, citations and indexes. – Herb Schulz May 08 '22 at 13:07
  • 3
    NOTE: If you don't want to use the pdflatexmk engine and you don't want to change the default to always use biber as noted in the anser above you can use biber on a document by document basis by using the TeXShop directive $ !BIB program = biber near the top of the Source file. Then using Typeset->BibTeX (Shft-Cmd-B) will us biber instead of bibtex for that document. – Herb Schulz May 28 '22 at 14:20