Using the following acm template (currently the latest commit) and adding

%>>>>>>>>>added for demonstration

before \input{samplebody-journals} in sample-acmsmall.tex generates the following:

enter image description here

What's the easiest way to fix this? I don't even need it to look good, just readable for my own purposes. I've spent more than an hour trying to override the default content table, but everything I try (such as using different packages or overriding the \tableofcontents command by following Adding a Table of Contents to the ACM style template) just breaks compilation entirely or produces non functional tables.

Linked Log File of Compilation

  • Welcome to TeX.SX! If you need it for your own purpose, why are you using that class?
    – TeXnician
    Commented Jun 8, 2017 at 5:32
  • Well I would like to submit to an ACM journal, but I just like to have a readable outline of the paper I'm currently doing for ordering my thoughts and keeping it in sync with the LaTeX source. Commented Jun 8, 2017 at 5:39
  • 2
    I downloaded the zip and tried the sample-acmsmall with a toc. I get an (\end occurred inside a group at level 1) message due to a brace too much in algorithm2e.sty, but beside this the output of the sample looks ok. Can you show your log-file? Commented Jun 12, 2017 at 10:04
  • @UlrikeFischer, thank you! The algorithm2e package was the problem that made other TOC packages impossible to work with. Fortunately I don't need algorithm2e for my work, so I can just comment it, so that's an OK workaround for me, although maybe suboptimal for other users who may need it. If you'd write an answer along these lines I'd award the bounty to it. Commented Jun 13, 2017 at 1:33

2 Answers 2


I cannot get the current version to actually compile the sample document without errors. That said, adding \usepackage{tocloft} (and ignoring all of the errors) gives the following table of contents.

enter image description here

  • 1
    Thank you @TH! Unfortunately my LaTex installation wasn't happy with the errors, so it wouldn't output to PDF. However, a combination of UlrikeFischer's comment and your package suggestion was the correct workaround for me. Commented Jun 13, 2017 at 1:37

I thought I've corrected this in the latest version. Ok, will take care of this in the new release.

To tell the truth, ACM papers rarely use table of contents, so I was not given any requirements by ACM for it.

Update Actually the development version on https://github.com/borisveytsman/acmart has it right:

enter image description here

As soon as ACM approves it, it will become the 'official' version and will be released on CTAN/TeX Live/MikTeX etc

  • Thank you for your work Boris. I can imagine that a TOC is mostly not used for the submission - but I find it really beneficial during the paper writing/revising process. For example instead of scrolling around to search for a section I can just hit home and do clicky the thingy ;-). It's also nice for co-authors and colleagues to get a quick overview and comment on the overall structure of the paper (look, here you have 10 pages and here only 3 even though it should be the focus etc.). Commented Jun 15, 2017 at 1:07
  • Boris, I've tested the latest version again by doing the exact same procedure I described in the question - same result. Are you sure that you've tested with acmsmall? Commented Jun 17, 2017 at 1:59
  • I am quite sure. Did you download the version from github?
    – Boris
    Commented Jun 17, 2017 at 13:13
  • @MichelMüller As I wrote im my comment some days ago I couldn't reproduce your problem. Check in the log-file or by using the --recorder option if you really use the files you are thinking you are using. Commented Jun 17, 2017 at 18:28
  • I see. It seems to me that the issue must be related to the local LaTeX installation - we have three differently reported results with the same code: TH. got errors and from TH's response it seems implied to me that he could reproduce, and with his suggested package he could output. UlrikeFischer and Boris saw an OK TOC. I got TH's behaviour, but no output unless deactivating the algorithm package. Well, that's about where I'm going to leave it I think. I'll add the log file as requested to the question just in case it turns out useful in the future. About the files I'm sure. Commented Jun 18, 2017 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .