Saltearse al contenido

BibLaTeX Basics

Esta página aún no está disponible en tu idioma.

BibLaTeX is a powerful option for managing bibliographies in Overleaf/LaTeX documents* and is the one we recommend the most. It offers more flexibility and customization options than traditional BibTeX (with Natbib) and more referencing types beyond the standards that allow you to cite online sources without workarounds. Here is an essential guide to help you get started with BibLaTeX:

Create entries

Create references in your CiteDrive project and link them to your Overleaf project. (see our quick start) guide) If you are using a different editor, you can download the .bib file from your CitDrive project.

Now, add the following lines to your LaTex document:

\documentclass{article}
\usepackage[
backend=biber,
style=authoryear
] {biblatex}
\addbibresource{bibliography.bib} % as exported by CiteDrive

Choose a bibliography style (e.g., style=authoryear) and set the backend to Biber (backend=biber).

In-text citations

Use \autocite{key} to cite references in your document. Replace “key” with the citation key from your bibliography file. \cite{smith2010} will work as well. For example:

\autocite{smith2010}

Use \parencite{key} for citations within parentheses, or \textcite{key} without.

BibLaTeX provides extensive customization options. You can customize the citation style, sorting, and more. Consult the BibLaTeX documentation for details.

\documentclass{article}
\usepackage[
backend=biber,
style=authoryear
] {biblatex}
\addbibresource{bibliography.bib}
\begin{document}
This is a citation example \cite{smith2010}.
\printbibliography
\end{document}

Filtered bibliography

A very cool feature is that you can display your bibliographies filtered by any keyword. In your BibTeX (.bib) file, you can categorize entries by entry types. For example:

@book{smith2010,
author = {John Smith},
title = {The LaTeX Guide},
year = {2010},
publisher = {Very good LaTeX Publications},
}
@article{jones2015,
author = {Alice Jones},
title = {Advanced LaTeX Techniques},
journal = {Journal of LaTeX Studies},
year = {2015},
}
@online{website2022,
author = {Web Author},
title = {CiteDrive},
year = {2022},
url = {http://www.citedrive.com},
}

In your LaTeX document, use the \printbibliography command with the type option to filter entries based on their types. For example:

\documentclass{article}
\usepackage[
backend=biber,
style=authoryear
] {biblatex}
\addbibresource{bibliography.bib}
\begin{document}
\section{Books}
\printbibliography[type=book, title={Book sources}]
\section{Articles}
\printbibliography[type=article, title={Publications}]
\section{Websites}
\printbibliography[type=online, title={Online sources}]
\end{document}

This will also work with keywords:

@book{smith2010,
author = {John Smith},
title = {The LaTeX Guide},
year = {2010},
publisher = {Very good LaTeX Publications},
keywords = {algorithms,maths,physics}
}

\printbibliography[keyword=algorithms, title={Sources on Algorithms}]