Blog der Hauptbibliothek

How to Cite in LaTeX

16. June 2020 | Anna C. Véron | Keine Kommentare |

This post is also available in: Deutsch

LaTeX is a free and open source document preparation system, and especially popular among scientists who want to include mathematical and technical expressions in their documents. Overleaf is an online LaTeX editor, which is available to all members of UZH and highly recommended for LaTeX beginners since it also contains useful guides and tutorials: University of Zurich on Overleaf
For comprehensive information on LaTeX packages, documentations and much more, visit CTAN (Comprehensive TeX Archive Network)

With this blog post we want to give new (and old?) users a guideline on how to create citations and reference lists and compare different literature management softwares for their compability with the LaTeX typesetting environment.

The *.bib file

The central part of citing references in LaTeX is a text file containing the metadata of all the references the author wants to use in their document. It has the extension *.bib and is typically stored in the same folder as the corresponding *.tex file.

The structure of a reference in a *.bib file is explained below.

(Click on the image to enlarge it.)

How to get the *.bib file

We recommend that you use a literature management software to export the desired references into a *.bib file. Alternatively, for quick one-time use of a reference, you can copy the BibTeX format from many publisher’s websites and literature databases (e.g. Web of Science or Scopus). Copying the BibTeX format from Google Scholar citations is not recommended, because the data can be of poor quality, leading to incomplete data in the bibliography.

The BibLaTeX package

BibLaTeX is a modern package which combines several older packages (babelbib, bibtopic, bibunits, chapterbib, cite, inlinebib, mlbib, multibib, splitbib). It uses the backend bibliography processor “biber” which replaces the older BibTeX. (BibTeX is not the same as BibLaTeX!)

This package allows the formatting of citations and references in LaTeX. Some of its features include:

  • Subdivided reference lists (by type, keyword, etc.). Example: list scientific publications and online sources separately in your reference list)
  • Several bibliographies within one document. Example: reference lists after each chapter of a book or thesis.
  • Different citation styles

The basic usage of the BibLaTeX package in a LaTeX document is shown below:

The code above compiles into a reference with a very basic formatting:

This basic reference style can be (and most likely needs to be) further adapted. Some options on how to achieve this are given in the next paragraph. For extensive information on the BibLaTeX package consult its documentation.

Adapting citation and bibliography styles

The BibLaTeX package offers several built-in styles to adapt the formatting of citations and references, which can be specified when the package is loaded.

How to specify the citation and bibliography style when loading the BibLaTeX package.

Examples of built-in bibliography and citation styles.

Even after adapting the citation style, your reference might contain data which you would like to hide, e.g. the publication month, editor of the journal, ISSN, DOI, URL, etc.

With the following commands in the preamble of your document you can avoid certain fields from being displayed in the bibliography or citation:

We do not recommend deleting fields or data in the original *.bib file.

Literature management softwares and LaTeX

Zotero allows you to export *.bib files in BibLaTeX formatting. It is a great tool to organize, sync and share references. Open source and freely available for mac OS, Linux and Windows. Tutorial: BibLaTeX export from Zotero


JabRef is a reference management software that directly works with *.bib files and fully supports BibLaTeX. With Jabref it is easy to edit the fields and keep an overview over your references. Freely available for mac OS, Linux and Windows.User guide for JabRef

Citavi is another literature management software that allows direct export of *.bib files in the BibLaTeX formatting. It is especially useful to those who work a lot with books. Citavi is not for free, but a campus license is available for all UZH members. Citavi only works on Windows (or on Mac with virtual machines).Tutorial: BibLaTeX export from Citavi

Mendeley is a great literature management software for scientists who work a lot with articles and PDFs. In addition to its literature management, syncing and collaboration features it allows you to view, mark and annotate PDFs. Mendeley can export *.bib files, but only in the BibTeX formatting. Overleaf has an option to directly import references into a *.bib file from the Mendeley Web Library.
Freely available for Mac OS, Linux and Windows.
Tutorial: Import Mendeley references into Overleaf.

EndNote is a popular and well established literature management program in the STM fields. It has extensive functionalities to organize literature and share with coworkers. The compatibility with LaTeX is somewhat reduced compared to other softwares mentioned above. An output style that allows BibTeX exports can be downloaded here. To our knowledge, there is no direct BibLaTeX support as of today. Video: Using EndNote Records with LaTeX

Papers is another literature management software that works very well with PDF articles and in collaborations with researchers. According to its documentation it allows for BibTeX export, but to our knowledge, there is no direct BibLaTeX support as of today.

Summary

  • Export a *.bib file of your references from your literature management software
  • Use the BibLaTeX package to create and format citations in your LaTeX document
  • Need help? Visit the documentation on Overleaf or contact Dr. Anna Véron (Subject specialist for chemistry and physics, as well as contact person for mathematics and computer sciences): naturwissenschaften@hbz.uzh.ch

Abgelegt unter: Coffee LecturesGood to knowTips for ResearchersTips for Students
Tags: