diff --git a/.github/workflows/build_paper.yml b/.github/workflows/build_paper.yml index ac30341..575cd42 100644 --- a/.github/workflows/build_paper.yml +++ b/.github/workflows/build_paper.yml @@ -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 @@ -49,4 +49,4 @@ jobs: tag_name: release-${{ github.run_number }} files: | paper.pdf - draft.pdf + submission.pdf diff --git a/Makefile b/Makefile index 33d5256..ad7ea9a 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,10 @@ # 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) @@ -18,7 +12,7 @@ IMAGES := $(wildcard images/*.jpg images/*.pdf images/*.png) # from textidote .PHONY: grammar -all: ${PDF_DRAFT} ${PDF_PAPER} +all: ${PDF_SUBMISSION} ${PDF_PAPER} # spelling and grammar grammar: paper.tex @@ -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 diff --git a/README.md b/README.md index 8f895f8..2c0211e 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/draft.tex b/draft.tex deleted file mode 100644 index cc5da3c..0000000 --- a/draft.tex +++ /dev/null @@ -1,2 +0,0 @@ -\def\paperversion{draft} -\input{paper} diff --git a/paper.tex b/paper.tex index 7d27c46..b016510 100644 --- a/paper.tex +++ b/paper.tex @@ -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} diff --git a/submission.tex b/submission.tex new file mode 100644 index 0000000..f21b38c --- /dev/null +++ b/submission.tex @@ -0,0 +1,2 @@ +\def\paperversion{normal} +\input{paper}