80/20 LaTeX Snippets to Polish Your Papers

Making latex documents look great, while satisfying, is generally a painful experienceIt would probably be a lot more bearable and maybe even fun, if latex had a sane scripting language like typst.. However, I have a handful of snippets that require no tweaking but immediately make your documents look more polished.

First, use the pdfusetitle option with hyperref. This puts the title of your paper into the metadata of the PDF file. Then, when somebody downloads your paper from arxiv, the tab title will be the actual title of your paper instead of 2006.09011v2.pdf. See this paper for an exampleYou can also put other metadata into the PDF file such as the author names or the publication venue by passing pdfauthors etc to \hypersetup..

Next, please set colorlinks=true in hyperref. It has become less common, but I used to see papers with jarring red or green boxes around any clickable element all the time. With colorlinks=true, hyperref will instead color the actual text, improving readability greatly. You can also customize the colors of course with linkcolor, urlcolor and citecolor. I can recommend picking colors from the xkcd color name survey with the xkcdcolors package.

Finally, a fix for the paper outline for papers with appendix. With this I mean the outline navigation that you have by default on the lefthand side in many PDF readers such as the built-in readers in firefox and chrome. By default, your appendix sections will appear on the same level as your main sections. This makes it difficult to see at a glance what belongs to the main paper and puts more emphasis on the appendix sections than they deserve. They are the appendix, after all. I have seen quick fixes for this where authors make appendix sections subsections of an appendix “section”.

However, the bookmark package lets you fix the outline without messing with the section hierarchy in your document directly. With bookmarksetupnext, you can “demote” appendix sections to subsections of a virtual “Appendix” section that will only exist in the outline.

The following has all the recommended snippets combined to copy and paste.

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
26
27
\documentclass{article}

\usepackage{bookmark}

\usepackage{xkcdcolors}
\usepackage[pdfusetitle]{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=xkcdCrimson,
urlcolor=xkcdBluish,
citecolor=xkcdLightNavy,
}

% ...

\begin{document}

% ...

\appendix
% Group the appendix sections in the PDF bookmarks
\bookmarksetupnext{level=part}
\pdfbookmark{Appendix}{appendix}

% ...

\end{document}