name: title class: title, middle

LaTeX tips

Alex Hernández-García (he/il/él)

.turquoise[Rolnick Lab · Montréal · Oct. 27th 2021]

.center[ Mila ]

.footer[ @alexhdezgcia] :scale 1em


\citep{} and \citet{}

natbib provides handy commands and great functionality for handling citations:


\citep{} and \citet{} allow to correctly integrate citations within a sentence:

Pro tip: you can tweak the details of citations, for example:


Further reading:


Clean organisation of the bib entries

.conclusion[Do as you wish, but mostly be consistent]


Different parts of a document can be identified with the command \label{id} and referenced elsewhere with \ref{id}


cleveref for improved references

cleveref improves standard references with extra features, such as:

Further reading:


LaTeX’s default colours are bad for you and your readers, but that’s easy to fix:


Using colours is a great idea for highlighting text during paper writing, for example different authors may have different colours, etc.


LaTeX for big documents

Theses, reports, long papers, etc.

One of the main advantages of LaTeX is that we can easily separate style and content. Keeping this philosophy in mind while writing LaTeX documents will save us time and help us focus. Usually we have style.sty files for specifying all style and format details, and content.tex files to include our content.

Having content as plain text enables version control, handling lightweight files and makes collaboration and sharing easy.

For long documents these features become particularly important. I took good advantage of them for my PhD thesis, which is available on GitHub.