Why would a .tex file compile with PDFLatex but not simpdftex?

I have been trying to compile the acmart samples in a manner that I am familiar. Instead of using PDFLatex and in their Makefile example, I am trying to compile the source using TeX + DVI due to the fact that I want the intermediate files (I have a bunch of TiKz rendering). When I type:

pdflatex --file-line-error --synctex=1 sample-manuscript.tex


Everyone is fine and well. When I type:

simpdftex latex --maxpfb --extratexopts "-file-line-error -synctex=1" --distiller ps2pdf14 sample-manuscript.tex


I get a stack error, Error: /undefined in XC@ACMRed, and a whole bunch of chaos.

Is there any reason that a .tex file would compile with pdflatex and not the TeX+DVI path?

1 Answer

The problem seems to lie in the fact that the class defines some colors using the cmyk model.

If I pass the rgb option to xcolor, compilation with simpdftex is successful. Do

\documentclass[manuscript, review, screen, rgb]{acmart}


or add \PassOptionsToPackage{rgb}{xcolor} before the \documentclass line.

The option forces xcolor to do conversion to RGB for every defined color, whatever model the definition uses.

A minimal file that exhibits the same problem, but not if we do \usepackage[rgb]{xcolor}:

\documentclass{article}
\usepackage{xcolor}

\definecolor[named]{ACMRed}{cmyk}{0,0.90,0.86,0}

\begin{document}

\textcolor{ACMRed}{XYZ}

\end{document}


Thanks to Ulrike Fischer who, in chat, set my attention to the prologue option. So, instead of rgb, a better solution is to do

\documentclass[manuscript, review, screen, prologue]{acmart}


I'll make an issue report to Boris.

• It would have been nice if it threw some sort of error as it seems that is something that could be checked. Thank you for solving this. – b degnan Oct 15 '17 at 20:12
• @bdegnan The error happens during the ps2pdf phase, so too late for LaTeX do issue meaningful errors. – egreg Oct 15 '17 at 20:14
• @bdegnan There's even a better way. – egreg Oct 15 '17 at 20:49