Last week I published an R script to interface with Gitbook. I received some positive feedback and decided to include all the code in an R package. This also allowed me to make some nice additions including default support for MathJax. It is currently available on Github and can be installed using devtools
:
devtools::install_github('jbryer/Rgitbook')
I have only tested this on Mac OS X, so please provide suggestions or issues on other systems. And of course, I wrote the documentation using the Gitbook framework. That is available here: jason.bryer.org/Rgitbook