Skip to content

Commit

Permalink
Print comments in paper.pdf and create submission.pdf without comments
Browse files Browse the repository at this point in the history
When editing a paper we want to see the version with comments. In VSCode,
it is easy to look at the PDF that is created from the main .tex file,
paper.tex in our case. Hence, we make this version the one with comments.

For submission, we always have submission.pdf that will give us a file
without comments and without extended document size.
  • Loading branch information
tobiasgrosser committed Mar 23, 2024
1 parent 4d60865 commit dda068e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 49 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_paper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Compile draft
- name: Compile paper
uses: xu-cheng/latex-action@master
with:
root_file: draft.tex
root_file: paper.tex

- name: Compile paper
- name: Compile submission
uses: xu-cheng/latex-action@master
with:
root_file: paper.tex
root_file: submission.tex

- name: Format Python files with yapf
id: autoyapf
Expand All @@ -49,4 +49,4 @@ jobs:
tag_name: release-${{ github.run_number }}
files: |
paper.pdf
draft.pdf
submission.pdf
37 changes: 10 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
# Source Latex files
TEX_MAIN = paper.tex

TEX_MAIN_DRAFT = draft.tex
TEX_MAIN_PAPER = paper.tex
TEX_MAIN_BLIND = blind.tex
TEX_MAIN_CAMERA_ACM = cameraACM.tex
TEX_MAIN_SUBMISSION = submission.tex

# Generate PDF files
PDF_DRAFT = draft.pdf
PDF_PAPER = paper.pdf
PDF_BLIND = blind.pdf
PDF_CAMERA_ACM = cameraACM.pdf
PDF_SUBMISSION = submission.pdf

IMAGES := $(wildcard images/*.jpg images/*.pdf images/*.png)

# grammar is a phony rule, it generates index.html
# from textidote
.PHONY: grammar

all: ${PDF_DRAFT} ${PDF_PAPER}
all: ${PDF_SUBMISSION} ${PDF_PAPER}

# spelling and grammar
grammar: paper.tex
Expand All @@ -28,32 +22,21 @@ grammar: paper.tex
-textidote --check en --output html paper.tex > index.html
python3 -m http.server


${PDF_DRAFT}: ${TEX_MAIN_DRAFT} ${TEX_MAIN} ${IMAGES}
latexmk ${TEX_MAIN_DRAFT}

${PDF_PAPER}: ${TEX_MAIN_PAPER} ${TEX_MAIN} ${IMAGES}
${PDF_PAPER}: ${TEX_MAIN_PAPER} ${IMAGES}
latexmk ${TEX_MAIN_PAPER}

${PDF_CAMERA_ACM}: ${TEX_MAIN_CAMERA_ACM} ${TEX_MAIN} ${IMAGES}
latexmk ${TEX_MAIN_CAMERA_ACM}

draft: ${PDF_DRAFT}

blind: ${PDF_BLIND}
${PDF_SUBMISSION}: ${TEX_MAIN_SUBMISSION} ${IMAGES}
latexmk ${TEX_MAIN_SUBMISSION}

paper: ${PDF_PAPER}

cameraACM: ${PDF_CAMERA_ACM}

view-draft: ${TEX_MAIN_DRAFT} ${TEX_MAIN} ${IMAGES}
latexmk -pvc ${TEX_MAIN_DRAFT}
submission: ${PDF_SUBMISSION}

view-paper: ${TEX_MAIN_PAPER} ${TEX_MAIN} ${IMAGES}
view-paper: ${TEX_MAIN_PAPER} ${IMAGES}
latexmk -pvc ${TEX_MAIN_PAPER}

view-camera-acm: ${TEX_MAIN_CAMERA_ACM} ${TEX_MAIN} ${IMAGES}
latexmk -pvc ${TEX_MAIN_CAMERA_ACM}
view-submission: ${TEX_MAIN_SUBMISSION} ${IMAGES}
latexmk -pvc ${TEX_MAIN_SUBMISSION}

clean:
latexmk -C
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![Compile paper](../../workflows/Compile%20paper/badge.svg)

Download:
[Draft (with comments)](../../releases/latest/download/draft.pdf) |
[Paper](../../releases/latest/download/paper.pdf)
[Paper (with comments)](../../releases/latest/download/paper.pdf)
[Submission (without comments)](../../releases/latest/download/submission.pdf) |

This repository serves as a template for writing computer science papers in LaTeX. It supports
the following features:
Expand Down
2 changes: 0 additions & 2 deletions draft.tex

This file was deleted.

19 changes: 6 additions & 13 deletions paper.tex
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
\def\paperversiondraft{draft}
\def\paperversionblind{normal}
\def\paperversioncameraACM{cameraACM}
\def\paperversionnormal{normal}

% If no draft paper-version is requested, compile in 'normal' mode
\ifx\paperversion\paperversiondraft
% If the paper version is set to 'normal' mode keep it,
% otherwise set it to 'draft' mode.
\ifx\paperversion\paperversionnormal
\else
\ifx\paperversion\paperversioncameraACM
\else
\def\paperversion{normal}
\fi
\def\paperversion{draft}
\fi

\ifx\paperversion\paperversioncameraACM
\documentclass[sigplan]{acmart}
\else
\documentclass[review, anonymous, sigplan]{acmart}
\fi
\documentclass[review, anonymous, sigplan]{acmart}

\def\acmversionanonymous{anonymous}
\def\acmversionjournal{journal}
Expand Down
2 changes: 2 additions & 0 deletions submission.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
\def\paperversion{normal}
\input{paper}

0 comments on commit dda068e

Please sign in to comment.