carpentries-incubator / latex-novice-typesetting

Typesetting in LaTeX
https://carpentries-incubator.github.io/latex-novice-typesetting/
Other
2 stars 2 forks source link

Suggestion additional episodes: labels & cross-referencing, reference management #3

Open jennyostrop opened 3 years ago

jennyostrop commented 3 years ago

I would like to suggest two additional topics/episodes that are very useful for writing documents such as bachelor/master/PhD thesis or scientific articles: 1) Labels and cross-referencing with \label{ } and \ref{ } 2) Reference management with BibTeX (providing examples for natbib and biblatex, it's useful to know both, see below), optional with an explanation how .bib files can be created with reference management software such as Zotero or JabRef.

Example for chronological citations with natbib:

\usepackage[square,numbers]{natbib}
\bibliographystyle{abbrvnat}
\usepackage{doi}
...
\begin{document}
Lorem ipsum \cite{Doe2021}.

\bibliography{my_library}
\end{document}

Example for chronological citations with biblatex:

\usepackage[backend=biber,style=numeric,bibstyle=numeric,sorting=none]{biblatex}
\addbibresource{my_library.bib}
\usepackage{doi}
...
\begin{document}
Lorem ipsum \cite{Doe2021}.

\printbibliography
\end{document
alanocallaghan commented 3 years ago

This is the basis for my zotero/bibtex setup https://retorque.re/zotero-better-bibtex/exporting/auto/