Navigation auf uzh.ch
LaTeX is a free and open source document preparation system which is excellent for the preparation of scientific works.
In order to be able to follow this tutorial basic skills in LaTeX are required. In case you are a beginner, we recommend the Tutorials on Overleaf or a course by the Central IT services of UZH.
LaTeX contains many packages which allow for various functionalities and customizations. die As a consequence there are also various possibilities for generating citations and reference lists in a document.
In order to cite in LaTeX you will need:
There are two widely used packages for creating references in LaTeX:
|
BibLaTeX download and documentation | |
Offers many practical functionalities for citing and creating bibliographies (e.g. you can create reference lists after each chapter). |
||
Full Unicode/UTF-8support for special characters and symbols |
||
Contains many different citation and bibliography styles which can be adapted easily (coding in LaTeX notation). |
||
Is continuously developed and updated. | ||
Not compatible with the REVTeXdocument class which is still required for writing manuscripts for many journals. |
|
natbib documentation | |
Obsolete, has not been updated since 2009. | ||
Problems with special characters (e.g. umlauts). Information about natbib and special characters can be found in the following post:How to write “ä” and other umlauts and accented letters in bibliography? |
||
Customization of citation styles is cumbersome (requiresprogramming in Postfix notation).). | ||
Some journals require that LaTeX manuscripts are submitted in the REVTeXdocument type. This document type is only compatible with natbib. |
Another component when citing in LaTeX is a text file that contains the metadata of all references you want to use in your document. The file has the extension *.bib and is usually stored in the same folder as the corresponding *.tex file.
References in the *.bib file have a certain structure, which is explained in the following figure.
Be aware that biblatex and bibtex are not identical. The exact field structure and available document types in *.bib files is different for the bibtex and biblatex format.
Which of the two formats you need depends on the package you are using. For the biblatex package you need the biblatex format, for natbib you need bibtex.
We recommend that you use a literature management softwareto export the desired references as a *.bib file. Depending on the program, it is possible to choose between bibtex and biblatex format for the export, but many only allow the bibtex export.
With the free literature management program JabRef you can convert *.bib files from bibtex to biblatex, and vice versa.
Citavi | biblatex and bibtex |
Select references, then File → Export → Select whether to export only the selected titles or all titles in the project → Select export filter BibTeX or BibLaTeX → Save as text file. |
JabRef | biblatex and bibtex | No export necessary, JabRef saves references directly in *.bib format. Offers many handy options to customize and clean up *.bib files. |
EndNote | bibtex only |
|
EndNote Basic | bibtex only | Format → Export References Select References, then choose "BibTeX Export" under Export style and click Save. |
Mendeley Reference Manager | bibtex only | Select references, then click the "Export" button at the bottom of the screen and select "BibTeX", then save file. |
ReadCube Papers | bibtex only | Select references, then right-click a reference → Export Metadata → As BibTeX |
Zotero | biblatex and bibtex | Select References, then Right Click on a reference → Export → select BibLaTeX or BibTex under Format. |
The biblatex package is loaded in the preamble of the LaTeX document. Additionally, it is recommended to load the packages inputencwith the parameter utf8, babelwith the language of the document, as well as csquotes:
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{biblatex}
The next step is to specify the path to the .bib file that contains the references for your work, replacing "references.bib" with the name of your file:
\addbibresource{references.bib}
At the point in your document where you want a simple citation of a reference to appear, set the citation command \cite{Nobody2023}
, replacing "Nobody2023" with the citekey of the desired reference.
There are many more citation commands in biblatex that you can use to customize your citations almost any way you want. More information can be found in chapter 3.8 of the biblatex user manual and on the biblatex cheat sheet.
At the point in your document where you want the bibliography to appear, set the /printbibliography
command. This only works if you have cited references in the document. There are also many options for customizing the reference lists, which you can find in chapter 3.7 in the biblatex user manual
A minimal working example for citations and reference lists with biblatex is explained in the following figure. You can also download our example file. (ZIP, 725 bytes)
Careful: This minimal reproducible example is only intended as an explanation of how the biblatex package works. The references generated with it are insufficiently formatted for most applications. In the next steps of the tutorial you will learn how to apply citation styles.
Biblatex offers several built-in styles for formatting citations and references. A compilation of the most popular packages and citation styles is available on the biblatex overview page.
To apply a style, specify it as a parameter (in square brackets) when loading biblatex, e.g. for the Nature citation style:
\usepackage[backend=biber, style=nature]{biblatex}
Below are some formatting tips for some of the most popular citation styles.
ACS |
\usepackage[backend=biber, style=chem-acs, articletitle=true, chaptertitle=true, maxbibnames=4]{biblatex} Use the \supercite command to make numeric citations appear superscript. |
Example file for biblatex chem-acs (ZIP, 89 KB) |
Angewandte Chemie | \usepackage[backend=biber, style=chem-angew]{biblatex} | Example file for biblatex-chem-angew (ZIP, 62 KB) |
APA 7th |
\usepackage[backend=biber, style=apa]{biblatex} If titles are to be capitalized, insert the following command in the preamble after loading biblatex: \DeclareFieldFormat{apacase}{#1} |
Example file for biblatex-apa (ZIP, 75 KB) |
APS |
\usepackage[backend=biber, style=phys, maxbibnames=10]{biblatex} If titles are to be capitalized, insert the following command in the preamble after loading biblatex: \DeclareFieldFormat{titlecase}{#1} |
Example file for biblatex-phys (ZIP, 86 KB) |
Chicago | Consult documentation of biblatex-chicago orwindycity | |
IEEE |
\usepackage[backend=biber, style=ieee]{biblatex} If titles are to be capitalized, insert the following command in the preamble after loading biblatex: \DeclareFieldFormat{sentencecase}{#1} |
Example file for biblatex-ieee (ZIP, 96 KB) |
MLA | See documentation of biblatex-mla | |
Nature |
\usepackage[backend=biber, style=nature]{biblatex} Use the \supercite command to make numeric citations appear superscript. |
Example file for biblatex-nature (ZIP, 110 KB) |