Last active
June 5, 2026 14:31
-
-
Save kha-dinh/f2b52fe34a371096e555a686f501d2ed to your computer and use it in GitHub Desktop.
ACM acmart sigplan: single-column draft mode with margin notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % ============================================================= | |
| % ACM acmart sigplan: single-column draft mode with margin notes | |
| % ============================================================= | |
| % | |
| % Problem: acmart's sigplan format hardcodes twocolumn mode. | |
| % There's no clean way to get single-column output while | |
| % preserving sigplan formatting (fonts, headings, citations). | |
| % | |
| % This hack: | |
| % 1. Hijacks \twocolumn so \maketitle stays single-column | |
| % 2. Sets text width to one sigplan column (~3.33in) | |
| % 3. Uses remaining space for todonotes margin notes | |
| % 4. Disables twoside margin switching (notes always on right) | |
| % | |
| % Usage: wrap in \ifdraft or similar conditional. | |
| % Requires: \usepackage{geometry}, \usepackage{todonotes} | |
| % --- In preamble (inside \ifdraft) --- | |
| \usepackage{geometry} | |
| \usepackage{todonotes} | |
| % --- After \begin{document}, INSTEAD of bare \maketitle --- | |
| % Hijack \twocolumn to prevent \maketitle from enabling twocolumn | |
| \makeatletter | |
| \let\origtwocolumn\twocolumn | |
| \renewcommand{\twocolumn}[1][]{\vbox{#1}\@twocolumnfalse} | |
| \makeatother | |
| \maketitle | |
| % Restore \twocolumn and set single-column geometry | |
| \makeatletter | |
| \let\twocolumn\origtwocolumn | |
| \makeatother | |
| \setlength{\textwidth}{3.33in} % sigplan column width | |
| \setlength{\hsize}{3.33in} | |
| \setlength{\columnwidth}{3.33in} | |
| \setlength{\linewidth}{3.33in} | |
| \setlength{\marginparwidth}{3.33in} % wide margin for todonotes | |
| \setlength{\marginparsep}{24pt} % matches sigplan columnsep | |
| % Force margin notes to right side on all pages | |
| \makeatletter\@twosidefalse\@mparswitchfalse\makeatother | |
| % Fix extra gap between title and first section | |
| \vspace{-\baselineskip} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment