My favourite LaTeX package

The Chalkdust editors share some of their favourites

post

Adam Townsend: cleveref

If you want cross-references in your LaTeX file (spoiler: you do), then you need to learn about cleveref.

Instead of filling your document with theorem \ref, section \ref and \eqref, you can just write \cref and cleveref will automatically write what kind of thing you’re referencing. It even does ranges!

And if you decide later that you want to make ‘theorem’ start with a capital letter (spoiler: you don’t), simply add some cleveref settings to your preamble and they’ll all change.

Madeleine Hall: booktabs

Second only to amsmath and graphicx, the package booktabs is my favourite due to its unbounded capacity to improve your tables in LaTeX.

No more \rule{0cm}{8pt} to get more space between your data and the horizontal line above. No more borders of uniform width. No more vertical lines!

Throw out \hline and say hello to \toprule, \midrule and \bottomrule, and give your table data the space it needs to truly shine.

David Sheard: tikz

Tikz is an amazingly versatile tool whose primary function is to draw 2D graphics in LaTeX. While a little fiddly to get used to at first, it ends up being a really fun package to use (most of the time, except when it is infuriating—but that’s LaTeX for you)!

As an indication of its utility, it is used on about half of the pages of our printed magazine, sometimes in surprisingly hidden ways.

Matthew Scroggs: realhats

Usually, the command \hat puts a circumflex above a letter. When writing a paper, this can be confusing as hats can be used to denote many different things.

Realhats can fix this problem by allowing you to put a huge range of hats over your letters.
Letters with hats on: an example of the realhats LaTeX package

Matthew is a postdoctoral researcher at University College London. He hasn’t had time to play Klax since the noughties, but he’s pretty sure that Coke is it!

Adam is an assistant professor at Durham University, where he investigates weird, non-Newtonian fluids. If he’s not talking about the maths of chocolate fountains he is probably thinking about fonts, helping Professor Dirichlet answer your personal problems, and/or listening to BBC Radio 2.

Madeleine is a pHd StUdEnT in mathematics and behavioural genomics at Imperial College London. She likes open water swimming, toast, the Oxford comma, and tHiS mEmE. She has still found none of her optimised strokes of any use in the Serpentine.

David is a final year PhD student at UCL studying geometric group theory. When not doing maths he can usually be found singing or playing the flute.

More from Chalkdust