%.xml: %.cml
# Protect HTML special chars in R code chunks
Rscript -e 't <- readLines("$*.cml"); writeLines(gsub("str>", "strong>", gsub("]*)>", "", "]]>", t))), "$*.xml")'
# Expand element abbreviations
Rscript tidy.R
xsltproc expand.xsl $*-tidy.xml > $*-expanded.xml
xsltproc contract.xsl $*-expanded.xml > $*.xml
%.Rhtml : %.xml
# Transform to .Rhtml
xsltproc knitr.xsl $*.xml > $*.Rhtml
%.html : %.Rhtml
# Use knitr to produce HTML
Rscript knit.R $*.Rhtml
all:
make index.html
# Make different theme versions
Rscript themes.R
# Make printable version
Rscript print.R
# Make R script
Rscript script.R
# Make speaker notes
Rscript notes.R
web:
cp -r ../minard-paradox/* ~/Web/Talks/useR2018/