Try and replicate knitr