Closed maxheld83 closed 4 months ago
For a quick hack, you can use RMarkdown to generate a "knitted" document as regular Markdown, which you can then render with GitBook. That's the approach I'm taking for the moment, until I see how the resulting books look.
My experience with ebook toolchains is that everything works for HTML, but that you either get a good-looking PDF or you get a good-looking EPUB and MOBI, but not both. It's the same issue the responsive web design folks have trying to build something that works on an iPhone 1, a big iPad and a 1280x800 laptop.
yeah, that's my experience, too @znmeb .
I wonder though, whether rmarkdown
and knitr
might finally change that; rmarkdown
can make really pretty, full-blown LaTeX documents.
I was wondering whether @SamyPesse might be interested in using this toolchain (rmarkdown) as a backend; should be relatively easy to have it read in the options and structure set in SUMMARY.md
, and then just make a properly typeset book.
I can see one big disadvantage and I have no idea how severe it would be for the hosted part of gitbook.io – LaTeX takes up a lot of space in a VM, and LaTeX is a resource hog.
FWIW I'm planning on spending some time tomorrow getting an RMarkdown - knitr - Pandoc EPUB and EPUB3 test case working. It turns out that if you compile R from source, it can now make EPUB and MOBI versions of the manuals via Calibre! See section 2.3 in http://cran.rstudio.com/doc/manuals/r-release/R-admin.epub for the details.
My test case will include EpubCheck and maybe FlightCrew as well. I'm not sure where it'll be posted - probably on BitBucket somewhere in https://bitbucket.org/znmeb/osjourno/src/103e1469f49dc35903b0bf4339ac760a38f2d928/4Experimental/
Just changed the title: RMarkdown
is obviously only a wrapper to Pandoc and LaTeX, so this isn't really about RMarkdown
at all.
Still, I'd love to see better, pro-grade PDF output from Gitbook, and LaTeX via Pandoc have essentially accomplished this. (Problem being, of course, how to do this serverside, since LaTeX is huge and a pain).
Some framework for multiple PDF backends would be useful. Asciidoctor -> dblatex also makes a high quality book and open up a number of asciidoc/docbook features absent from the markdown toolchain.
Extends gitbook build system with pandoc converter.
GPP (gitbook-plugin-build) extends gitbook build system with pandoc converter. Pandoc is your swiss-army knife when it comes to coverting files. GPP use pandoc build system to convert and compile your book in variety of formats:
Writing books with this plugin will be peace of cake. And here cake is not a lie!
For more informations please visit projects official homepage.
Copyright © 2016 Uroš Jarc
MIT License
following up on #307, the Rmarkdown R package also includes an impressive function to make PDFs (via Pandoc and genuine LaTeX) – they are, I have to say, a lot prettier than the PDF generated by gitbook.io.
I am again not sure how feasible running LaTeX on your backend would be, but this sure would make very, very nice PDFs – and it takes any markdown as input (because Rmarkdown is just a superset).
Anyway, I really dig the idea that rmarkdown might become the new standard for more complex, technical/scientific writing, irrespective of what kind of output you like at the end of the day.
Would be nice to see a marketplace/platform like gitbook.io leverage this tech.