18
0
Files
cdsc_tex/paper_template/Makefile
Benjamin Mako Hill a3e469ca3f paper_template (knitr): port to master's article + lualatex stack
Bring the knitr paper template up to date with the typography work
on master. The preamble now mirrors master's paper_template/text.tex:

- \DocumentMetadata{pdfstandard=ua-2} + tagpdf instead of the old
  memoir / pdfmanagement-only setup
- article class with cdsc-paper.sty (the article-class replacement
  for cdsc-memoir.sty added on master)
- fontspec with EB Garamond and TeX Gyre Heros, plus
  \defaultfontfeatures{Ligatures=TeX} so --, ---, ``, '' work
- Makefile builds with latexmk -lualatex instead of -pdf

The knitr-specific bits are preserved unchanged:

- <<init>>= chunk for knit_hooks and resources/preamble.R
- <<test_table>>= chunk demonstrating kable inside a table float
- %.tex: %.Rtex pattern rule for knit() in the Makefile

verapdf --flavour ua2: 0 failures, 1723 passed rules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 09:47:22 -07:00

29 lines
416 B
Makefile

#!/usr/bin/make
all: $(patsubst %.Rtex,%.pdf,$(wildcard *.Rtex))
%.tex: %.Rtex
Rscript -e "library(knitr); knit('$<')"
%.pdf: %.tex
latexmk -f -lualatex $<
clean:
latexmk -C *.tex
rm -f *.tmp *.run.xml
rm -f vc
rm -f *.bbl
# the following lines are useful for Rtex/knitr
rm -rf cache/ figure/
rm -f *.tex
viewpdf: all
evince *.pdf
vc: resources/vc-git
pdf: all
.PHONY: clean all
.PRECIOUS: %.tex