R Packages to wrap around latex packages?

As I've been using R Markdown for reporting I'm seeing a common design pattern: I keep writing light wrappers around latex packages. So, for example, I've written a small bit of R that will use the pdfpages latex library to pull pages from a pdf and insert them in my final PDF document which I create with R Markdown. I was also thinking today about a wrapper around a latex package to allow me to flip output pages to landscape.

Which brings me to a question: Has the community opined on how these light weight wrappers should be redistributed? I can imagine three main scenarios:

  1. The wrapper code could become part of R Markdown
  2. Each wrapper could be its own R package: e.g. create an R package that includes my 20 lines of code that wrap pdfpages in R functions
  3. There could be a master package where we could contribute these wrappers to any latex packages and they would all be rolled into one package.

Any input would be appreciated.


1 Like