TARFILE = ../gggrid-deposit-$(shell date +'%Y-%m-%d').tar.gz ## Requires R 4.1 for radial gradient (at least) ## Rscript = ~/R/r-devel/BUILD/bin/Rscript Rscript = Rscript %.xml: %.cml %.bib # Protect HTML special chars in R code chunks $(Rscript) clean.R $*.cml $(Rscript) toc.R $*.xml $(Rscript) bib.R $*.xml $(Rscript) foot.R $*.xml ## Replace any -- (that are neither ) with - ## For XSL processing (.xml -> .Rhtml) $(Rscript) -e 'x <- readLines("$*.xml"); writeLines(gsub("([^!])--([^>])", "\\1--\\2", x), "$*.xml")' %.Rhtml : %.xml # Transform to .Rhtml xsltproc knitr.xsl $*.xml > $*.Rhtml ## Reverse transform D;D; -> -- (post XSL processing) ## AND make sure