Build full and conference versions
This commit is contained in:
parent
21a2dcd6e9
commit
d204e5b8b1
3
.gitignore
vendored
3
.gitignore
vendored
@ -21,7 +21,8 @@ figures/src/*.pdf
|
||||
build/
|
||||
figures/build/
|
||||
main.pdf
|
||||
main.pdf.tmp
|
||||
main-conf.pdf
|
||||
*.pdf.tmp
|
||||
|
||||
# Downloads waiting to be moved to context/related-papers/
|
||||
ingest/*
|
||||
|
||||
27
Makefile
27
Makefile
@ -1,19 +1,28 @@
|
||||
# vimtex and make watch write into build/ (set in .latexmkrc); make writes into build/make/, so it can run while a watch is compiling.
|
||||
# vimtex and make watch write into build/ (set in .latexmkrc); make writes into build/make/, so it can run while a watch is compiling. make builds the full version into main.pdf and the conference version into main-conf.pdf.
|
||||
|
||||
LATEXMK := latexmk
|
||||
FLAGS := -interaction=nonstopmode -halt-on-error -file-line-error
|
||||
BUILD := build/make
|
||||
FULL := build/make/full
|
||||
CONF := build/make/conf
|
||||
ARXIV := build/arxiv
|
||||
|
||||
FIG_SRC := $(wildcard figures/src/*.tex)
|
||||
FIG_PDF := $(FIG_SRC:figures/src/%.tex=figures/build/%.pdf)
|
||||
FIG_DATA := $(wildcard figures/data/*)
|
||||
|
||||
.PHONY: all figures watch clean arxiv wordcount
|
||||
.PHONY: all full conf figures watch clean arxiv wordcount
|
||||
|
||||
all: figures
|
||||
$(LATEXMK) $(FLAGS) -outdir=$(BUILD) main.tex
|
||||
cp $(BUILD)/main.pdf main.pdf.tmp && mv main.pdf.tmp main.pdf
|
||||
all: full conf
|
||||
|
||||
full: figures
|
||||
$(LATEXMK) $(FLAGS) -outdir=$(FULL) main.tex
|
||||
cp $(FULL)/main.pdf main.pdf.tmp && mv main.pdf.tmp main.pdf
|
||||
|
||||
# The conference version defines \conference before main.tex is read; the last line prints the page on which its References heading lands.
|
||||
conf: figures
|
||||
$(LATEXMK) $(FLAGS) -outdir=$(CONF) -usepretex='\def\conference{}' main.tex
|
||||
cp $(CONF)/main.pdf main-conf.pdf.tmp && mv main-conf.pdf.tmp main-conf.pdf
|
||||
@sed -n 's/^\\newlabel{references}{{[^}]*}{\([^}]*\)}.*/Conference version: References on page \1/p' $(CONF)/main.aux
|
||||
|
||||
figures: $(FIG_PDF)
|
||||
|
||||
@ -35,12 +44,12 @@ watch: figures
|
||||
clean:
|
||||
rm -rf build figures/build
|
||||
|
||||
# The tarball takes main.tex, sections/, appendix/, macros/, bib/, the compiled figures, the .bbl and the files of venue/; context/, scratch/, ingest/, .claude/, CLAUDE.md, writing-style-guide.md, claudese.md and .mcp.json stay out.
|
||||
arxiv: all
|
||||
# The tarball holds the full version: main.tex, sections/, appendix/, macros/, bib/, the compiled figures, the .bbl and the files of venue/; context/, scratch/, ingest/, .claude/, CLAUDE.md, writing-style-guide.md, claudese.md and .mcp.json stay out.
|
||||
arxiv: full
|
||||
rm -rf $(ARXIV) && mkdir -p $(ARXIV)/figures/build
|
||||
cp -r main.tex sections appendix macros bib $(ARXIV)/
|
||||
cp figures/build/*.pdf $(ARXIV)/figures/build/
|
||||
cp $(BUILD)/main.bbl $(ARXIV)/
|
||||
cp $(FULL)/main.bbl $(ARXIV)/
|
||||
find venue -type f ! -name .gitkeep -exec cp {} $(ARXIV)/ \;
|
||||
tar -czf build/arxiv.tar.gz -C $(ARXIV) .
|
||||
@echo "Wrote build/arxiv.tar.gz"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user