Installing LaTeX and editor
If you want to work with LaTeX in a local desktop editor, instal the recommended software for your platform:
- Linux: TeX Live (already installed on UiO Linux machines with the editor Kile)
- Mac: MacTeX (available on UiO machinies from Managed Software Center) (MacTeX comes with the editor TexShop)
- Windows: MiKTeX (available for UiO machines from Company Portal and Software Center) (MikTeX comes with the editor TeXworks)
Better BibTeX for stable citation keys and sync
Better BibTeX is a recommended Zotero plugin for LaTeX. Better BibTeX is particularly useful if you use a desktop editor as it can keep exported .bib files automatically updated (Overleaf has its own functionality for this). Better BibTeX also ensures stable citation keys.
Yale Library has a nice insallation guide:
Exporting .bib-file from Zotero to LaTeX
You will need a .bib file with your references. You can use a reference tool such as EndNote or Zotero (recommended) for this.
- In Zotero, go to File → Export Library...
- Select Better BibLaTeX as the format if you have installed the Better BibTeX add-on; otherwise, select BibLaTeX.
- Place the exported .bib file (for example, references.bib) in the same folder as your .tex file (for example, mythesis.tex).
- With the Better BibTeX add-on for Zotero, the .bib file will update automatically when you make changes in Zotero.
- In a local desktop editor, use Biber as the backend program for BibLaTeX.
It is very important that the .tex file and the .bib file are in the same folder.
MyThesis/
├── mythesis.tex
└── references.bib JabRef as an alternative for .bib-files
If you do not use Zotero, JabRef is another good free application for managing .bib files for LaTeX.
Setup and commands on Mac, Windows, Linux
BibLaTeX and biber
BibLaTeX is the recommended package for reference management instead of the older BibTeX system. Biblatex operates with biber as the backend program where biblatex takes care of how the references appear in the document while biber is the engine running in the background, sorting and processing your reference data. When you recompile, biber is activated and must therefore be available in the editor, which it is in Overleaf, where it is the default engine for processing reference data. In desktop editor, this must be set up.
In TeXShop for Mac:
- Go to settings → engine → write biber in the box for BibTeX Engine
TeXworks for Windows:
- TeXworks comes with biber as an option in the dropdown menu for LaTeX compilation
Kile for Linux:
- Kile comes with Biber as an option under Build in the menu for LaTeX compilation
In the preamble of your .tex file, after you have specified documentclass, activate the biblatex package with biber as the backend program:
\usepackage[backend=biber]{biblatex} - When you begin to write and cite, you must compile to see your changes.
- You must run biber between the pdflatex runs when you change your references.
Compiling in TexShop for Mac: Go to Typeset in the menu
Select LatTeX,
then BibTex (which in settings you have set to run biber),
then LaTeX again,
repeat LaTeX.Compiling in TeXworks for Windows: In the dropdown manu next to the green play button:
Select pdfLaTeX and push the green button.
Select Biber and push the green button.
Select pdfLaTeX again and push the green button.
Repeat pdfLaTeX.Compiling in Kile for Linux: Kile has better support for automating the compilation process. For compiling go to Build in the menu and run
Build → Compile
Build → Biber
Build → Compile
Build → CompileIf Kile has Latexmk in the Build menu, this is the simplist option. Latxmk will run all the necessary compilation steps automatically, including Biber, when your document uses backed=biber.
Build → Compile → Latexmk