Top 10 LaTeX packages for academic writing
Martin Isaksson
Martin Isaksson
4 min read

Categories

Tags

In academic writing with LaTeX there are a lot of things that can be frustrating to the author. For many of these things there exists many packages that can help alleviate this frustration, but it is hard to find them. In this post I list 10 of my favorite packages to help remove some of this frustation, and make your papers look nicer so that you have a higher probability of getting your paper accepted. Hopefully.

Table of Contents

  1. Introduction
  2. Packages
    1. adjustbox
    2. balance or flushend
    3. booktabs
    4. cleveref
    5. glossaries-extra
    6. microtype
    7. pgfplots
    8. savetrees
    9. siunitx
    10. tikz
  3. Conclusion

Introduction

At the time of writing, The Comprehensive TEX Archive Network (CTAN) has 5841 packages. Many of these are used very often, such as amsmath, graphics and xcolor (Cormode et al., 2012), and some are not used enough. This post is a list of packages that I find very useful in academic writing, but yet I don’t see them being used enough. And a blog isn’t really a blog without a top ten list, I guess.

Without further ado, in alphabetical order, here are 10 useful LaTeX packages for your writing pleasure.

Packages

adjustbox

The adjustbox package (Scharrer, 2012) allows scaling of a figure or plot, for example one made in TikZ.

1
\usepackage{adjustbox}                % Balances the columns of the last page

Here is an example from a real paper, slightly edited for clarity.

1
2
3
4
5
6
7
8
\begin{figure}[t!]
    \centering
    \begin{adjustbox}{width=.75\linewidth}%
        \input{./figures/my_tikz_figure.tex}%
    \end{adjustbox}%
    \caption{An overview of our solution.}
    \label{fig:overview}
\end{figure}

balance or flushend

The two columns on the last page of a two-column paper should be the same length. This package saves you from having to balance the columns manually (Daly, 1999).

1
\usepackage{balance}                % Balances the columns of the last page

Simply add \balance in the first column of the last page, and you’re done! Some users like the flushend package better as this doesn’t require adding anything on the last page.

Without balance
No column balancing.
With flushend
With balance.
With flushend
With flushend.
Examples with and without column balancing using the 2019 SysML LaTeX template example.

booktabs

Simply put, booktabs (Fear, 2020) makes your tables look good!

Consider this example, adapted from Animal table with booktabs.png (licensed under the Creative Commons Attribution 4.0 International license).

1
\usepackage{booktabs}              % Nicer tables
Booktabs example.
Booktabs example.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
\documentclass[10pt, a4paper]{article}
\usepackage{booktabs}
\usepackage[tableposition=top]{caption}

\begin{document}

\begin{table}
\centering
\caption{This is my table, there are many like it, but this one is mine.}
\label{tbl:mytable}
\begin{tabular}{llr}
\toprule
\multicolumn{2}{c}{Item} \\
\cmidrule(r){1-2}
Animal & Description & Price (\$) \\
\midrule
Gnat  & per gram & 13.65 \\
      & each     &  0.01 \\
Gnu   & stuffed  & 92.50 \\
Emu   & stuffed  & 33.33 \\
Armadillo & frozen & 8.99 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

cleveref

Using the cleveref package (Cubitt, 2012), we can refer to figure, tables etc without specificing the type. See~\cref{tbl:mytable} produces “See table 1”.

1
\usepackage[capitalise]{cleveref}  % Clever references to stuff.

The result is configurable, and we can for example change the figure type name with \crefname{figure}{Fig.}{Fig.}, where the first Fig. is the singular form and the second is the plural form.

glossaries-extra

Using the package glossaries-extra we can add a list of terms and a list of acronyms to our document (Talbot, 2016; Talbot, 2018). It is also very useful for making sure that acronyms are written out the first time they are used.

1
2
3
4
\usepackage[acronym]{glossaries-extra}
\setabbreviationstyle[acronym]{long-short}

\newacronym{gcd}{GCD}{Greatest Common Divisor}

We can then use \gls{gcd} whenever we need to use this acronym. See Glossaries on Overleaf for more examples.

microtype

Text typeset in LaTeX already looks great, but can be made even nicer with microtype (Schlicht, 2019). Looking deeper at the micro-typographics extensions provided by microtype is a great way to ensure getting trapped in a rabbit hole for a long time. Here are the settings I use, borrowed from the excellent post Tips on Writing a Thesis in LaTeX (Khirevich, n.d.).

1
2
3
4
5
6
7
8
9
\usepackage[
    protrusion=true,
    activate={true,nocompatibility},
    final,
    tracking=true,
    kerning=true,
    spacing=true,
    factor=1100]{microtype}
\SetTracking{encoding={*}, shape=sc}{40}
Without microtype
Without microtype.
With microtype
With microtype.
Examples with and without microtype. Examples were compiled with pdfLaTeX in TeX Live 2019.

pgfplots

1
\usepackage{pgfplots}
Example figure produced with this method.
Example figure produced with this method.

See Publication ready figures for a longer post on the pgfplots package (Feuersänger, 2014).

savetrees

savetrees (Pakin, 2007) is magic. It is highly useful when you are approaching a conference deadline and you have one page over the conference limit. Using the subtle mode, we can preserve the document layout and try to make LaTeX pack text tighter.

1
\usepackage[subtle]{savetrees}
Without microtype
Without savetrees.
With microtype
With subtle savetrees.
Without microtype
With moderate savetrees.
With microtype
With extreme savetrees.
Examples with various degrees of savetrees. The examples were compiled using pdfLaTeX from TeX Live 2019.

siunitx

Typesetting numbers with units is actually not trivial. siunitx (Wright, 2009) adds, among others, the commands \SI and \num so that we can write \SI{1024}{\byte} or \num{{}e5}, which makes things look much nicer.

1
2
3
\usepackage{siunitx}               % A better way of writing things with units
\sisetup{load-configurations = abbreviations, binary-units = true}
\DeclareSIUnit\px{px}

tikz

TikZ and PGF (Feuersänger et al., 2014) are packages for programatically creating figures, and deserve a longer writeup.

1
2
3
4
5
6
7
8
\usepackage{tikz}

\usetikzlibrary{shapes, decorations, calc, arrows}
\usetikzlibrary{3d,fit,backgrounds, decorations.text}
\usetikzlibrary{positioning, shapes.symbols}
\usetikzlibrary{decorations.pathreplacing, calligraphy}

\tikzset{>=latex}
TikZ figure example from a recent paper.
TikZ figure example from a recent paper.

See more examples of TikZ figures on TeXample.net.

Conclusion

There are probably more top ten lists of LaTeX packages than there are packages, and here’s another one. Hope you enjoyed it!

What are your favorite packages? Comment below!

References

  1. Cormode, G., Muthukrishnan, S., & Yan, J. (2012). Scienceography: The study of how science is written. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 7288 LNCS, 379–391. https://doi.org/10.1007/978-3-642-30347-0_37
  2. Scharrer, M. (2012). The adjustbox Package. Ctan, 1–29. https://www.ctan.org/pkg/adjustbox
  3. Daly, P. W. (1999). Balancing the Two Columns of Text on the Last Page. 3–4. https://www.ctan.org/pkg/balance
  4. Fear, S. (2020). Publication quality tables in LaTeX. 1–18. https://ctan.org/pkg/booktabs
  5. Cubitt, T. (2012). The cleveref package. Sort, 1–28. https://www.ctan.org/pkg/cleveref
  6. Talbot, N. L. C. (2016). User Manual for glossaries. 1–240.
  7. Talbot, N. L. C. (2018). Glossaries-Extra : an Extension To the Glossaries Package. 1–201.
  8. Schlicht, R. (2019). Microtype. 1–249. https://ctan.org/pkg/microtype
  9. Khirevich, S. Tips on Writing a Thesis in LaTeX. Retrieved May 3, 2020, from http://www.khirevich.com/latex/microtype/
  10. Feuersänger, C. (2014). Manual for Plotting Package pgfplots. 1–500. https://ctan.org/pkg/pgfplots
  11. Pakin, S. (2007). The savetrees package. 1–25. https://www.ctan.org/pkg/savetrees
  12. Wright, J. (2009). siunitx — A comprehensive ( SI ) units package. System, 1–60. https://www.ctan.org/pkg/siunitx
  13. Feuersänger, C., Menke, H., & Tantau, T. (2014). TikZ & PGF manual. https://www.ctan.org/pkg/pgf

Suggested citation

If you would like to cite this work, here is a suggested citation in BibTeX format.

@misc{isaksson_2020,
  author="Isaksson, Martin",
  title="Martin's blog --- Top 10 LaTeX packages for academic writing",
  year=2020,
  url=https://blog.martisak.se/2020/05/03/top-ten-latex-packages/,
  note = "[Online; accessed 2020-08-17]"
}

Revisions