Are you loading incompatible packages with a template?

(Reader, this is going to be a long, ranty, rambling piece; I apologise beforehand.)

There are LaTeX packages for typesetting all kinds of things. And sometimes, there are more than one LaTeX  packages that can do (almost) the same thing — but are not compatible with each other so you often cannot load them at the same time.

If you had been given a template e.g. for typesetting your report, thesis, conference or journal manuscript, be sure to read through the instructions and example code provided in the .tex file. There may be important information re the specific packages that had already been loaded by the template or class to help you typeset certain elements (e.g. algorithms; code listings; sub-figures or sub-tables) — you should then use the commands and environments provided by these packages (i.e. the packages that the template intend you to use), and avoid loading other packages that provide similar functions. Continue reading

Did you know — you can now use CSL reference styles in LaTeX

(I like this so much that I’ll repost it here after writing about it on the Overleaf blog!)

It’s now possible to use Citation Style Language stylesheets (.csl files) to format citations and reference lists in LaTeX documents! Make sure your LaTeX packages are reasonably up-to-date for this to work.

You can find .csl styles here (let’s use uoy-archaeology-jsm.csl as an example); and put it in the same folder as your .tex file. Load the citation-style-language package in the preamble:

\documentclass[12pt]{article}
\usepackage{citation-style-language}
\cslsetup{style = uoy-archaeology-jsm}
\addbibresource{researchDesign.bib}
 
\begin{document}
... This combination of data from multiple sources may present problems 
in the categorisation and comparison of sites across the region as a 
whole, in particular the Scottish region where few radiocarbon dates are
available and many site not been classified by date 
\cite{elliot-email-2023,beckensall-northumberland-2005}
 
\printbibliography
 
\end{document}

Then after compiling with latex/pdflatex/xelatex, instead of running bibtex to process the citations and .bib file, run the citeproc-lua command instead. Follow up with the usual one or two more runs of latex/pdflatex/xelatex, and watch your citations and references appear. A .bbl file will be generated, which you can include in your manuscript submissions to journals.

But if you’re compiling with LuaLaTeX, things will “just work” with just a single compile.

This will be useful if your institution or journal requires a particular reference style that doesn’t have a corresponding BibTeX or biblatex style file, but does have a CSL style file.