# How to use the ACM SIGGRAPH / TOG LaTeX template

by Oded Stein, MIT

This post is part of a series of guides on how to write your first ACM SIGGRAPH / TOG paper. You can find the other articles here.

This tutorial will help you to set up the LaTeX environment to write
your first ACM SIGGRAPH / TOG paper.

## What is LaTeX?

LaTeX is an old text editing software that works differently than Microsoft Word / Google Docs or other modern text editors you might be used to. LaTeX is closer
to programming than it is to Microsoft Word. In LaTeX you write your text together with commands in a plain text file, and this plain text file is then compiled, like a program, to a PDF. There is no direct editing of the document. If you want to change someting in the PDF, you edit the source plain text file, and you recompile the document.

LaTeX has many advantages and it has many disadvantages. It is possible to create very professional-looking mathematical formulas, and most maths textbooks you are familiar with probably created their formulas with LaTeX. On the other hand it can be very difficult to control. Unlike in Word, you cannot really decide where in the document your figures end up, and where a pagebreak will be.

LaTeX is actually a collection of programs that have accumulated over time. As such, in order to install it, you usually install a LaTeX distribution that contains all programs needed. I recommend different distributions for different operating systems:

• Windows: MiKTeX
• Linux: TeX Live. Install directly from the website or via your favorite package manager.
• MacOS: MacTeX.

These distributions come with their own text editors to edit LaTeX source, but you can use your favorite editor that you already use for code. Most editors have syntax highlighting for LaTeX in one form or another.

You can skip all of this by using an online hosted LaTeX service like Overleaf. Overleaf will make sure that they have a correctly set up LaTeX environment with all needed packages.

This tutorial is not a LaTeX tutorial. Luckily, there are many good LaTeX tutorials online, here are a few:

## LaTeX template

In order to create a SIGGRAPH / TOG LaTeX submission, you must use the official ACM template, which is available here: https://www.acm.org/publications/proceedings-template. Scroll to the bottom of the page and download the template.

The folder contains a lot of files that you do not need for a SIGGRAPH / TOG paper. Feel free to delete all files except for

acmart.bib
acmart.cls
ACM-Reference-Format.bst
samples/sample-acmtog.tex
samples/sample-sigconf.tex

Depending on whether you submit to SIGGRAPH or TOG, you will need the sample-acmtog.tex or sample-sigconf.tex file. I usually remove that file from the samples directory, place it in the root directory, and rename the tex and bib files to the name of my paper:

mypaper.bib
acmart.cls
ACM-Reference-Format.bst
mypaper.tex

Begin by choosing a title for your article.

\title{My Paper}

Before you submit, you have to fill out CCSXML and keywords. Go to http://dl.acm.org/ccs.cfm to pick the correct categories for your paper.

\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10010520.10010553.10010562</concept_id>
<concept_desc>Computer systems organization~Embedded systems</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10010520.10010575.10010755</concept_id>
<concept_desc>Computer systems organization~Redundancy</concept_desc>
<concept_significance>300</concept_significance>
</concept>
<concept>
<concept_id>10010520.10010553.10010554</concept_id>
<concept_desc>Computer systems organization~Robotics</concept_desc>
<concept_significance>100</concept_significance>
</concept>
<concept>
<concept_id>10003033.10003083.10003095</concept_id>
<concept_desc>Networks~Network reliability</concept_desc>
<concept_significance>100</concept_significance>
</concept>
</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Computer systems organization~Embedded systems}
\ccsdesc[300]{Computer systems organization~Redundancy}
\ccsdesc{Computer systems organization~Robotics}
\ccsdesc[100]{Networks~Network reliability}

In addition to CCS, make sure to also specify some user-defined keywords for your article. They can be arbitrarily chosen by you. Pick the ones you think describe your article best.

\keywords{relevant,key,words}

If you submit to SIGGRAPH, make sure to enter a submission ID!

\acmSubmissionID{123-A56-BU3}

You will have to fill out the copyright and journal commands after acceptance.

\setcopyright{acmcopyright}
\copyrightyear{2018}
\acmYear{2018}
\acmDOI{XXXXXXX.XXXXXXX}
%
\acmJournal{TOG}
\acmVolume{37}
\acmNumber{4}
\acmArticle{111}
\acmMonth{8}

You will also have to fill out the author info after acceptance.

%% Authors
\author{First Author}
\email{firstauthor@example.com}
\orcid{1234-5678-9012}
\affiliation{%
\institution{First Institution}
\country{Firstcountry}
}

\author{Second Author}
\orcid{1234-5678-9012}
\affiliation{%
\institution{Second Institution}
\country{Secondcountry}
}

\renewcommand{\shortauthors}{Firstauthor et al.}

This author info should include your ORCID. If any of the authors do not have an ORCID yet, you can set up your ORCID here: https://orcid.org/register

Finally, after your paper has been accepted, you can turn off the review mode and deanonymize your article by changing the first command to:

\documentclass[sigconf]{acmart}

OR

\documentclass[acmtog]{acmart}

## Generic LaTeX tips

While we will not go over how to use LaTeX here, there are a few generic hints that will help you be more productive when using LaTeX. I use these practices for every article I write.

2. Use different LaTeX files for different sections of your paper. So, for example, instead of having the main part of your article consist of a single file with all of the text included,
\section{Section}
Text

use different files and import them into your main file with \input{file}.

\input{introduction}
\input{relatedwork}
\input{definitions}

This helps organize your document. If you have collaborators, this also allows you and your collaborators to work on two different files at the same time without risking conflicting edits.

1. Use versioning to keep track of your changes, as well as making collaboration easier. There are two options I recommend for this:
• Use git to keep track of your edits. Here is a basic guide on how to use git. This gives you full control over your article, works even without an internet connection, and does not make you dependent on any third party.
• Use an online LaTeX editing and versioning system like Overleaf. Overleaf handles all the hosting and the versioning for you. The downside of this is that, in times of high demand, the quality of Overleaf service can be spotty.

## Bibliography

In LaTeX you will use BibTeX to cite other articles and manage your bibliography. Like LaTeX itself, BibTeX is vast and complicated (here is a guide). We will here look at a few basic and simple tips on how to use BibTeX.

Your references are located in a seperate .bib file. You import it into the main LaTeX document with the following command, which you should put at the end of the document, where you want the bibliography to appear:

%% Bibliography.
%% Uncomment the bibliography line and link to an actual bib file
\bibliographystyle{ACM-Reference-Format}
\bibliography{bibliography.bib}

The .bib file contains the items you can cite in its own special format. Please refer to the BibTeX guide for a more complete explanation of the format. Many journal websites contain an easy way to export BibTeX information for an article. For the ACM digital library, you can find BibTeX citations for any article here:

Beware: The citations that are available on journal formats often contain a lot of extraneous information that is not needed, and can make your bibliographies unnecessarily long. ACM’s citation for the article “Least squares conformal maps for automatic texture atlas generation” looks like this:

@article{10.1145/566654.566590,
author = {L\'{e}vy, Bruno and Petitjean, Sylvain and Ray, Nicolas and Maillot, J\'{e}rome},
title = {Least Squares Conformal Maps for Automatic Texture Atlas Generation},
year = {2002},
issue_date = {July 2002},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {21},
number = {3},
issn = {0730-0301},
url = {https://doi.org/10.1145/566654.566590},
doi = {10.1145/566654.566590},
abstract = {A Texture Atlas is an efficient color representation for 3D Paint Systems. The model to be textured is decomposed into charts homeomorphic to discs, each chart is parameterized, and the unfolded charts are packed in texture space. Existing texture atlas methods for triangulated surfaces suffer from several limitations, requiring them to generate a large number of small charts with simple borders. The discontinuities between the charts cause artifacts, and make it difficult to paint large areas with regular patterns.In this paper, our main contribution is a new quasi-conformal parameterization method, based on a least-squares approximation of the Cauchy-Riemann equations. The so-defined objective function minimizes angle deformations, and we prove the following properties: the minimum is unique, independent of a similarity in texture space, independent of the resolution of the mesh and cannot generate triangle flips. The function is numerically well behaved and can therefore be very efficiently minimized. Our approach is robust, and can parameterize large charts with complex borders.We also introduce segmentation methods to decompose the model into charts with natural shapes, and a new packing algorithm to gather them in texture space. We demonstrate our approach applied to paint both scanned and modeled data sets.},
journal = {ACM Trans. Graph.},
month = {jul},
pages = {362–371},
numpages = {10},
keywords = {texture mapping, polygonal modeling, paint systems}
}

and renders, in the LaTeX bibliography, as

This is unnecessarily wordy. I usually trim down an entry to only what is needed, and give it a catchy name that will make it easier for me to cite later:

@article{Levy2002,
author = {L\'{e}vy, Bruno and Petitjean, Sylvain and Ray, Nicolas and Maillot, J\'{e}rome},
title = {Least Squares Conformal Maps for Automatic Texture Atlas Generation},
year = {2002},
volume = {21},
number = {3},
journal = {ACM Trans. Graph.},
pages = {362–371}
}

This now renders as follows, which is more compact but still contains all needed information:

The name Levy2002 instead of 10.1145/566654.566590 makes it easier to reference this article throughout the text.

Using the identifier Levy2002, the article can now be referenced throughout the main document. There are three different ways to do this, and they depend on how you are using your reference in the article.

1. If you want to reference an article such that the citation has no specific grammatical function where it occurs (i.e., the text would make just as much sense grammatically if you just removed the citation), you use the citecommand:
Least Squares Conformal Mapping (LSCM) can be used to compute UV maps \cite{Levy2002}.
1. If you want to use the name(s) of the author(s) in a sentence, you use the citet command instead:
The Least Squares Conformal Mapping (LSCM) method of \citet{Levy2002} can be used to compute UV maps.
1. If you want to repeatedly use the name(s) of the author(s) in your text, you should not repeatedly use citet and render the publication year. Use citeauthor instead:
The Least Squares Conformal Mapping (LSCM) method of \citet{Levy2002} can be used to compute UV maps.
\citeauthor{Levy2002}'s approach is particularly suited for our application because of its efficiency.

## Figures

Figures in LaTeX are included with the following command,

\begin{figure}
\centering
\includegraphics[width=\linewidth]{filepath}
\caption{Caption}
\Description{Description}
\label{fig:myfigure}
\end{figure}

where filepath is the path to a PDF file that contains your figure.

Including figures in LaTeX is a bit of an art, and people have lots of different opinions on what the right and wrong ways are to do it. I will here show you how I do it.

I recommend you create your figures in a vector graphics app, such as Adobe Illustrator or Inkscape. Set your application to create PDF documents that can then be directly included in your LaTeX document. I personally use Adobe Illustrator.

There are two kinds of figures you will be creating for your paper: figures spanning one column and figures spanning two columns (these are created with \begin{figure*} and \end{figure*}, notice the *). Set up Illustrator to create an empty figure with exactly the right width for each figure type. You can find out the witdh for one column figures by printing the linewidth in your LaTeX document:

\the\linewidth

For me, this outputs 241.14749pt. The width of two column figures is determined by:

\the\textwidth

For me, this is 506.295pt.

The current ACM SIGGRAPH / TOG template uses the Linux Libertine font. I like to use the same font for any text that appears in my figures. I also like to match the font size to the caption font size. You can find out all kinds of information about your used font with the following command (source):

\expandafter\string\the\font

For me, this gives a font size of 9pt.

I also like to set the document color mode to RGB (instead of CMYK), since my papers will probably mostly be viewed on RGB computer screens. I have created, for myself, empty Adobe Illustrator PDF templates from which I can start my figures. For your convenience, here is my one column version, and here is my two column version.

It is very important to not only provide a caption for your figure (\caption), but also a description (\description). The description is presented to users of screen readers who are not able to view the image for some reason. Your article should make sense for readers who can not view images, but rely on descriptions alone. For example, Figure 5 of the least squares conformal maps paper is:

A potential description for this figure would be: “A: a dragon mesh segmented into various parts; the algorithm favors cylindrical segments. B: a sock-shaped cylindrical protrusion has an additional cut inserted by the method to minimize distortion.”

There is one special kind of figure that functions differently from all other figures: the teaser figure. The teaser figure appears at the top of your article, and you do not control its positioning. It is specified with the following command at the beginning of your article, and otherwise behaves like a two column figure:

\begin{teaserfigure}
\includegraphics[width=\textwidth]{filepath}
\caption{Teaser figure}
\Description{This is the teaser figure for the article.}
\label{fig:teaser}
\end{teaserfigure}

I will end this section with a few best-practice rule of thumbs that I use when creating my figures. None of these are hard rules, but if you are not very sure about what you are doing it is probably best to follow these until you have a little more intuition.

1. Try to avoid whitespace in figures as much as possible. Page real estate is valuable in articles, so do not waste it. Make all parts of your figure fit together like a puzzle with as few blanks as possible in between.
2. Do not arrange the parts of your figure in exotic ways. In an English-language article, people read from left to right, and then from top to bottom. Somebody who looks at your figure should be able to understand the figure by reading it from left to right, and then from top to bottom. Do not require your readers to look at the parts of your figure in a different order. To make the order of reading absolutely clear, you can add arrows.
3. Ideally, your reader will understand the point of your figure by merely looking at the images, without having to read the captions. The captions can add additional detail or provide context, but the figure itself should not be unintelligible without reading the caption.
4. If you add text to your figures, make the font size large enough so that the text can be read without zooming in. Unless you have a good reason not to, use the exact same font size as the caption in your figures.
5. When arranging figures, put them either on the top of the page, or on the bottom of the page. Try to avoid having a picture at the top and one at the bottom of the same page, which sandwiches your text in between figures.
6. You do not want the text of your articles to be lost in figures. As a rule of thumb, your figures should not take up more than half of each page on which there is also normal article text. If you need more space, insert a page in your article that has only figures and no text.

### Compression

When you create your PDF (especially if it contains lots of figures), its filesize will be very large. Very large filesizes are not good for many reasons, and you should compress your PDF to reduce its filesize as much as you can without sacrificing image quality before you upload it to the submission site or share it with other people.

There are many ways to compress a PDF. My preferred version uses Adobe Acrobat, and closely follows the settings of Alec Jacobson. Open your PDF in Adobe Acrobat, select the “compression” option, and then open the advanced compression options. In this options dialogue, use the following settings:

1. Color Images: Downsample to 600dpi if above 600dpi
2. Color Images: Compression JPEG
3. Color Images: Quality Maximum
4. Grayscale Images: Downsample to 600dpi if above 600dpi
5. Grayscale Images: Compression JPEG
6. Grayscale Images: Quality Maximum
7. Monochromatic Images: Downsample Off
8. Monochromatic Images: Compression JPEG
9. Monochromatic Images: Quality Maximum
10. Uncheck “fonts”
11. Check “discard objects”
12. Uncheck all except “discard all alternate images” and “discard embedded print settings”
13. Check “discard user data”
14. Uncheck all except “discard private data of other applications” and “discard hidden layer content” and “flatten visible layers”.
15. Check “clean up”
16. In “object compression options”, set “compress document structure”
17. Save this profile as your custom compression profile so that you can quickly use it in the future.

Since there is a limit for how much you can compress your PDF without sacrificing quality, but there are users who can only download very small files, I also recommend producing a highly compressed (<2MB) version of your article (with loss of quality) when you decide to share a preprint. Make both versions of your preprint available in one location.

## Checksumming

If you plan to submit your article to ACM SIGGRAPH, and you are working up until the very deadline, it can happen that the PDF submission closes before the actual deadline. When this happens, do not despair: until the deadline is passed you can still submit a MD5 checksum of your article.

MD5 checksum is a hash function that generates a 128-bit hash for any file. Instead of uploading a 30MB paper (and potentially overwhelming the SIGGRAPH server if everybody does this at once), you compute the MD5 checksum of your paper PDF, and upload that instead. It is reasonbly difficult to reverse, so you can not cheat by uploading a checksum, continuing to work on your paper, and then trying to fiddle with the PDF to find a hash collision.

There are different utilities for each operating system that will compute the MD5 checksum for you.

1. On Max OS X, the md5 command comes with the operating system and can be used in the command line via md5 filename.pdf.
2. On Linux you can use the md5sum command, which should be available in your distribution’s package manager. Make sure to download it ahead of time, and not at the last minute!
3. On Windows you can use the built-in certutil command to compute MD5 checksums, certutil -hashfile filename.pdf MD5.

So, on my Ubuntu Linux, I compute the checksum like this:

\$ md5sum filename.pdf
> 98475036dc73d318982805bf4b16e8b2  filename.pdf

It is very important to not lose the PDF that you generated your checksum from. Make sure to immediately copy it to somewhere you will not accidentally overwrite or delete it. Upload it to your online storage. Share it with your collaborators. If you checksum multiple times, make sure to keep track of which PDF generates which checksum. At last, do not forget to upload the article that matches your checksum after the deadline is over!

## Closing thoughts

This was a basic introduction on how to write ACM SIGGRAPH / TOG papers in LaTeX. I wish you good luck for your submission!

## Good luck!

This post is part of a series of guides on how to write your first ACM SIGGRAPH / TOG paper. You can find the other articles here.

We thank Mazdak Abulnaga for proofreading. We thank Stephen Spencer and Craig Reynolds for helpful comments.