Ron Bakker/LabTeXHelp
← Back to LabTeX

Guide

Citations and BibTeX

Each paper carries its own BibTeX library. You cite entries in the text; LabTeX numbers or sorts them in the layout’s style and builds the reference list at the end.

The library

Open References in the side panel. Every entry shows how it will be listed, its key, and whether it is cited ([1], or “not cited”). Cite inserts a citation at the cursor, Edit shows the BibTeX to change it, ✕ removes it. Only cited entries appear in the paper’s reference list; citations of keys that are not in the library show as a red [?] and are listed at the top of the panel.

Adding references

Citing

Press Cite (or Ctrl/⌘ + Shift + C), search by author, title, year or key, tick one or more entries and press Cite. Or type \cite{key} in the text. Click a citation to change its entries, its command or its note.

CommandNumbered layoutsAuthor–year (arXiv)
\cite{a}[1](Strogatz, 2015)
\cite{a,b}[1, 2] · [1–3] for ranges(Strogatz, 2015; Dormand and Prince, 1980)
\citep{a}[1](Strogatz, 2015)
\citet{a}Strogatz [1]Strogatz (2015)
\cite[p.~4]{a}[1, p. 4](Strogatz, 2015, p. 4)

The same text and library, typeset in a numbered layout:

Phase portraits \cite{strogatz2015} and adaptive Runge--Kutta methods \cite{dormand1980} are standard; \citet{strogatz2015} gives many examples \cite[ch.~5]{strogatz2015}.

\begin{filecontents*}{refs.bib}
@book{strogatz2015,
  author    = {Steven H. Strogatz},
  title     = {Nonlinear Dynamics and Chaos},
  publisher = {Westview Press}, edition = {2}, year = {2015}
}
@article{dormand1980,
  author  = {J. R. Dormand and P. J. Prince},
  title   = {A family of embedded {Runge--Kutta} formulae},
  journal = {Journal of Computational and Applied Mathematics},
  volume  = {6}, number = {1}, pages = {19--26}, year = {1980},
  doi     = {10.1016/0771-050X(80)90013-3}
}
\end{filecontents*}
Typesetting…

…and in the author–year style of the arXiv layout:

Phase portraits \cite{strogatz2015} and adaptive Runge--Kutta methods \cite{dormand1980} are standard; \citet{strogatz2015} gives many examples \cite[ch.~5]{strogatz2015}.

\begin{filecontents*}{refs.bib}
@book{strogatz2015,
  author    = {Steven H. Strogatz},
  title     = {Nonlinear Dynamics and Chaos},
  publisher = {Westview Press}, edition = {2}, year = {2015}
}
@article{dormand1980,
  author  = {J. R. Dormand and P. J. Prince},
  title   = {A family of embedded {Runge--Kutta} formulae},
  journal = {Journal of Computational and Applied Mathematics},
  volume  = {6}, number = {1}, pages = {19--26}, year = {1980},
  doi     = {10.1016/0771-050X(80)90013-3}
}
\end{filecontents*}
Typesetting…

Citation styles

LayoutIn the textReference list
Article, Two-column, Letter / report[1], numbered in order of first citationIEEE style: A. B. Author, “Title,” Journal, vol. 6, no. 1, pp. 19–26, 1980.
Journalsuperscript ¹, in order of citationNature style: Author, A. B. Title. Journal 6, 19–26 (1980).
arXiv preprint(Author, year)Author–year, alphabetical: Author, A. B. (1980). Title. Journal, 6(1):19–26.

BibTeX tips

In the LaTeX export

The library is written into the .tex file in a filecontents* block, so LaTeX creates refs.bib itself when it compiles; the LaTeX project also contains refs.bib as a file. Citations use natbib, with a bibliography style that matches the layout (unsrtnat for numbered, plainnat for author–year). Compile with latexmk -pdf main.tex, or with pdflatex, bibtex, pdflatex, pdflatex.