version checking and such works but xelatex error with usenix template
This commit is contained in:
parent
83cedb9d27
commit
635d49b75b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,7 @@
|
|||||||
/*.pdf
|
/*.pdf
|
||||||
|
|
||||||
|
.version_local
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
.vscode*
|
.vscode*
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
print("Using the local .latexmkrc\n");
|
||||||
|
|
||||||
# overleaf template
|
# overleaf template
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
|
3
.version_repo
Normal file
3
.version_repo
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Using the local .latexmkrc
|
||||||
|
Latexmk, John Collins, 17 Mar. 2022. Version 4.77
|
||||||
|
XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)
|
49
Makefile
49
Makefile
@ -1,34 +1,47 @@
|
|||||||
.PHONY: main.pdf clean redo test_git versioned
|
.PHONY: install_docker main.pdf clean redo test_git test_version versioned check-common-typos
|
||||||
|
|
||||||
|
DOCKER_VERSION=latest
|
||||||
|
|
||||||
|
DOCKER=docker run -i --rm --name latex -v "$$PWD":/usr/src/app -w /usr/src/app texlive/texlive
|
||||||
|
LATEXMK=$(DOCKER) latexmk
|
||||||
|
XETEX=$(DOCKER) xetex
|
||||||
|
LATEXDIFFVC=$(DOCKER) latexdiff-vc
|
||||||
|
|
||||||
|
# keep as first command to build stuff
|
||||||
main.pdf: main.tex main.bib
|
main.pdf: main.tex main.bib
|
||||||
latexmk -pdfxe main.tex # use xelatex to build pdf
|
$(LATEXMK) -pdfxe main.tex # use xelatex to build pdf
|
||||||
|
|
||||||
|
install_docker:
|
||||||
|
docker pull texlive/texlive:$(DOCKER_VERSION)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
latexmk -c
|
$(LATEXMK) -c
|
||||||
x=`biber --cache` && if [ -d "$x" ]; then $(RM) $x; fi
|
x=`biber --cache` && if [ -d "$x" ]; then $(RM) $x; fi
|
||||||
$(RM) *.out *.aux *.log *.bbl *.blg *~ *.toc *.idx *.eps dummy *.fls *.fdb_latexmk *.bcf *.run.xml *.xdv
|
#$(RM) *.out *.aux *.log *.bbl *.blg *~ *.toc *.idx *.eps dummy *.fls *.fdb_latexmk *.bcf *.run.xml *.xdv
|
||||||
$(RM) $(patsubst %.tex, %.ps, $(wildcard *.tex))
|
#$(RM) $(patsubst %.tex, %.ps, $(wildcard *.tex))
|
||||||
$(RM) $(patsubst %.tex, %.dvi, $(wildcard *.tex))
|
#$(RM) $(patsubst %.tex, %.dvi, $(wildcard *.tex))
|
||||||
$(RM) $(patsubst %.tex, %.pdf, $(wildcard *.tex))
|
#$(RM) $(patsubst %.tex, %.pdf, $(wildcard *.tex))
|
||||||
|
|
||||||
redo: clean main.pdf
|
redo: clean main.pdf
|
||||||
|
|
||||||
test_git:
|
test_git:
|
||||||
if [ -z "$$(git status --untracked-files=no --porcelain)" ]; then exit 0; else echo -e "\nERROR: working directory not clean. commit changes before running versioned build"; exit 1; fi
|
if [ -z "$$(git status --untracked-files=no --porcelain)" ]; then exit 0; else echo -e "\nERROR: working directory not clean. commit changes before running versioned build"; exit 1; fi
|
||||||
# TODO check if we are also synced to at least one remote
|
# TODO check if we are also synced to at least one remote
|
||||||
|
|
||||||
versioned: test_git clean main.pdf
|
test_version:
|
||||||
|
rm -f .version_local
|
||||||
|
$(LATEXMK) --version > .version_local
|
||||||
|
$(XETEX) --version | head -1 >> .version_local
|
||||||
|
@if ! diff -b .version_local .version_repo; then echo -e "\nWARNING! local versions and remote versions do not match! (above is local, below is repo)"; else echo "versions match!"; fi
|
||||||
|
|
||||||
|
versioned: test_git clean main.pdf test_version
|
||||||
cp main.pdf "main-$$(date -u +'%Y-%m-%dT%H:%M:%SZ')-$$(git rev-parse --short HEAD).pdf"
|
cp main.pdf "main-$$(date -u +'%Y-%m-%dT%H:%M:%SZ')-$$(git rev-parse --short HEAD).pdf"
|
||||||
|
|
||||||
# TODO latexdiff
|
# latexdiff: # TODO
|
||||||
# latexdiff-vc --pdf main.tex -r 123456 -r abcdef
|
# latexdiff-vc --pdf main.tex -r 123456 -r abcdef
|
||||||
|
|
||||||
# common typos check. find words, but ignore latex comment and macros
|
# common typos check. find words, but ignore latex comment and macros
|
||||||
CT=grep -inr --include \*.tex "$${TYPO}" | grep -v ":%" | grep -v "newacronym" | grep -i --color=always "$${TYPO}"; exit 0
|
|
||||||
check-common-typos:
|
check-common-typos:
|
||||||
TYPO="application" && ${CT}
|
./typos.sh
|
||||||
TYPO="run-time" && ${CT}
|
|
||||||
TYPO="behaviour" && ${CT}
|
|
||||||
TYPO="ground-truth" && ${CT}
|
|
||||||
TYPO="groundtruth" && ${CT}
|
|
||||||
TYPO="seperator" && ${CT}
|
|
||||||
|
20
README.md
20
README.md
@ -3,3 +3,23 @@
|
|||||||
## usage
|
## usage
|
||||||
|
|
||||||
The makefile contains build- and clean-instructions. Additionally, it contains a command to first check if everything is committed, then build and tag the pdf with the current datetime and git commit hash.
|
The makefile contains build- and clean-instructions. Additionally, it contains a command to first check if everything is committed, then build and tag the pdf with the current datetime and git commit hash.
|
||||||
|
|
||||||
|
## setup
|
||||||
|
|
||||||
|
- ubuntu 22.04
|
||||||
|
- Recent releases are needed, for latexmk on ubuntu this can be found at https://launchpad.net/ubuntu/+source/latexmk/1:4.77-1/+build/23584396
|
||||||
|
- texlive
|
||||||
|
|
||||||
|
## other notes
|
||||||
|
- latexmk 4.77 is only available in ubuntu 22.10
|
||||||
|
- texlive doesn't have recent deb files
|
||||||
|
- dockers
|
||||||
|
- arkark/latexmk is outdatad
|
||||||
|
- latexmk 4.74b
|
||||||
|
- last commit 2021-05 https://github.com/arkark/latexmk-docker
|
||||||
|
- nopreserveroot/texlive-full
|
||||||
|
- unknown repo
|
||||||
|
- texlive/texlive
|
||||||
|
- weekly updates
|
||||||
|
- https://gitlab.com/islandoftex/images/texlive
|
||||||
|
- usenix template uses microtype, but the latter requires pdftex and doesn't work with xelatex :sob:
|
||||||
|
13
main.tex
13
main.tex
@ -1,8 +1,8 @@
|
|||||||
% IEEE Template:
|
% IEEE Template:
|
||||||
\documentclass[conference]{templates/IEEEtran}
|
%\documentclass[conference]{templates/IEEEtran}
|
||||||
% USENIX Template:
|
% USENIX Template:
|
||||||
%\documentclass[letterpaper,twocolumn,10pt]{article}
|
\documentclass[letterpaper,twocolumn,10pt]{article}
|
||||||
%\usepackage{usenix-2020-09}
|
\usepackage{templates/usenix-2020-09}
|
||||||
% STANDALONE TEMPLATE
|
% STANDALONE TEMPLATE
|
||||||
%\documentclass{article}
|
%\documentclass{article}
|
||||||
%\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
|
%\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
|
||||||
@ -10,8 +10,9 @@
|
|||||||
|
|
||||||
% Packages
|
% Packages
|
||||||
|
|
||||||
\usepackage[T1]{fontenc}
|
%\usepackage[T1]{fontenc}
|
||||||
\usepackage[utf8]{inputenc}
|
%\usepackage[utf8]{inputenc}
|
||||||
|
\usepackage{csquotes}
|
||||||
\usepackage[english]{babel}
|
\usepackage[english]{babel}
|
||||||
\usepackage{tikz}
|
\usepackage{tikz}
|
||||||
\usepackage{subfig}
|
\usepackage{subfig}
|
||||||
@ -24,7 +25,7 @@
|
|||||||
\usepackage[labelfont=bf]{caption}
|
\usepackage[labelfont=bf]{caption}
|
||||||
\usepackage{comment}
|
\usepackage{comment}
|
||||||
\usepackage{xcolor}
|
\usepackage{xcolor}
|
||||||
\usepackage[nospread,keeplastbox]{flushend}
|
%\usepackage[nospread,keeplastbox]{flushend}
|
||||||
\usepackage{tcolorbox}
|
\usepackage{tcolorbox}
|
||||||
\usepackage{listings}
|
\usepackage{listings}
|
||||||
%\usepackage{cite}
|
%\usepackage{cite}
|
||||||
|
14
typos.sh
Executable file
14
typos.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
check_typo () {
|
||||||
|
grep -nri --include \*.tex "${1}" | grep -v ":%" | grep -v "newacronym" | grep -i --color=always "${1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
check_typo "application"
|
||||||
|
check_typo "run-time"
|
||||||
|
check_typo "behaviour"
|
||||||
|
check_typo "ground-truth"
|
||||||
|
check_typo "groundtruth"
|
||||||
|
check_typo "seperator"
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user