name: title class: title, middle
Alex Hernández-García (he/il/él)
.turquoise[Rolnick Lab · Montréal · Oct. 27th 2021]
.footer[alexhernandezgarcia.github.io | alex.hernandez-garcia@mila.quebec | @alexhdezgcia] ![]() |
\citep{}
and \citet{}
natbib
provides handy commands and great functionality for handling citations:
\usepackage{natbib}
\citep{}
and \citet{}
allow to correctly integrate citations within a sentence:
\citep{darwin1859origin}
: parenthetical citation (Darwin, 1859).\citet{darwin1859origin}
: textual citation, as Darwin (1859).–
Pro tip: you can tweak the details of citations, for example:
\RequirePackage{natbib}
\setcitestyle{authoryear,round,citesep={;},aysep={,},yysep={;}}
–
Further reading:
bib
entriesreferences.bib
for each research line that I use in all papers, reports, thesis, etc.references.bib
file in sections per topics.firstauthorYEARtopic
. Google Scholar uses firstauthorYEARfirstwordtitle
.–
.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}
\label{sec:results}
\label{fig:results-summary}
\label{tab:results-summary}
cleveref
for improved referencescleveref
improves standard references with extra features, such as:
as shown in \cref{fig:results}
: “as shown in Figure 3”see \cref{eq:th1,eq:th2,fig:results-summary}
: “see Eqs. (1) and (2) and Figure 3”see \crefrange{eq:1}{eq:4}
: “see Eqs. (1) to (4)”Further reading:
LaTeX’s default colours are bad for you and your readers, but that’s easy to fix:
\hypersetup{citecolor=MidnightBlue}
: to set the colour of hyperlinks with hyperref
xcolor
:\usepackage{xcolor}
\definecolor{highlightblue}{rgb}{0.435,0.659,0.863}
\hypersetup{citecolor=highlightblue}
Using colours is a great idea for highlighting text during paper writing, for example different authors may have different colours, etc.
\usepackage{blindtext}
allows to easily generate dummy Lorep ipsum content, with \blinddocument
, \blind{itemize}[3]
, \blindmathpaper
, etc.\usepackage{comment}
allows to easily comment out blocks of content with \begin{comment}
and \end{comment}
.h
, t
, b
!
, etc. to position figures and tables (to read more)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.