summaryrefslogtreecommitdiff
path: root/paper/lua-filters/track-changes/Makefile
blob: 990450eb02052bf0b1ba2faccffcbab6cde16f92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
.PHONY: test clean

## PENDING: ensure that LaTeX output can be compiled to PDF.
test: sample.md test-track-changes.sh sample.pdf
	@pandoc -t markdown --wrap=preserve \
	        --lua-filter=track-changes.lua sample.md | \
	    diff --strip-trailing-cr -u - expected_accept.markdown
	@pandoc -t markdown --wrap=preserve --track-changes=reject \
	        -M trackChanges:reject --lua-filter=track-changes.lua sample.md | \
	    diff --strip-trailing-cr -u - expected_reject.markdown
	@pandoc -s -t html --wrap=preserve --track-changes=all \
	        -M trackChanges:all --lua-filter=track-changes.lua sample.md | \
	    diff --strip-trailing-cr -u - expected_draft.html
	@pandoc -M trackChanges:all --track-changes=all --wrap=preserve \
	        --to=latex --lua-filter=track-changes.lua \
	        --standalone sample.md | \
	    sh test-track-changes.sh
	@rm sample.pdf

sample.pdf: sample.md track-changes.lua
	@pandoc -M trackChanges:all --track-changes=all \
	        --lua-filter=track-changes.lua \
	        --output $@ $<

clean:
	rm sample.pdf || true