Skip to content

itaraju/m4-pandoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository is demonstrating an idea about how to implement literate programming using a combination of the following tools:

Among those tools R, pandoc and make are common place in literate programming and used as tools for reproducible analysis 1234.

But it's not been common to see m4 used among them. And it's possible to use m4's macros to have values computed in R inserted in documents before pandoc compilation. Here I'm refering to R, but actually it could be any programming language. Also make is not a requirement, but due to the extra number of operations involved, it would be more practical to coordinate the steps through make.

To follow the Makefile here is the best way to figure out how m4 can be integrated in this approach.

Here m4 is basically avoiding the use of knitr1, but the intent is not to provide an alternative for this package. But the fact that m4 can be used in this kind of workflow seems interesting, and might add more flexibility to some workflows.