Closed maxheld83 closed 5 months ago
I thought I had been following what you were saying until you mentioned gitbook becoming a front-end for LaTeX. Do you mean the graphical editor?
I would love if we could get LaTeX support in gitbook! Can you even imagine the ability to swap out Markdown files for .tex files!? Total game changer. I wonder if we could somehow tap into luatex and get an intermediate format suitable for feeding through some processor to get less terrible HTML output (not that I don't have a historically-soft spot in my heart for the likes of tth). Does this constitute part of a larger discussion?
In any case, +1 for LaTeX support of some sort in gitbook.
@yonkeltron sorry I wasn't being clear (I'm not a developer and sometimes a bit hazy about terminology); no I didn't mean as a graphical editor (I think the various editors out there are doing a fine job) – I meant as a way to publish a LaTeX source online.
There are already WYSIWYG front-ends for LaTeX, LyX and TeXmacs. I personally use LyX. LyX can export XHTML, which you can probably push into Pandoc to get Markdown, though I haven't tried it.
There is also the RStudio/RMarkdown/knitr/pandoc toolchain for making HTML and PDFs; it can render to Markdown in just about all of the dialects via Pandoc options.
So there are lots of hacks that might work, but I'd try LyX export to XHTML first if you want to publish LaTeX to the web.
Pandoc + HTML is good, but AsciiDoc + docbook seems like a much better route to generate high quality books (richer feature set, orientation towards publication). By using Asciidoc for the gitbook, I was able to compile a nice LaTeX-based PDF this way and the results looked very good for my needs:
#!/bin/bash
perl -p -e 's/\d+\.\s+link:(.+).adoc\[.+\]/$1.adoc/g' SUMMARY.adoc > summary
echo "" > compiled.adoc;
for file in $(cat summary);
do cat "$file" >> compiled.adoc;
printf "\n\n" >> compiled.adoc;
done;
asciidoctor -b docbook compiled.adoc -d book;
dblatex compiled.xml --param toc.section.depth=1 \
--param insert.xref.page.number=yes \
--param table.in.float=0;
Any thoughts about that?
+1 for LaTeX support
The good folks at RStudio now have Bookdown ... you write in R Markdown and get a website in a GitBook-like styling, Bootstrap styling or their own "Tufte HTML" styling. PDFs are done via pandoc and the system LaTeX, although for best results you want to use XeLaTeX.
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
As I mentioned in #134 I (and I think a lot of other scholars) have been waiting for something like gitbook to come along for a very long time. This might just be one of the missing pieces to the puzzle of online scientific publishing. PDFs, no matter how well structured and meta-data-ed always felt a little awkard online, with people having to download them and all.
Still, academic publishing as over decades (nay, centuries) developed many helpful conventions (theorem numbering, glossaries, acronyms, – you name it) that don't sit easily with markdown.
Fortunately, we have one markup language that has implemented all of these things already: LaTeX. Of course, much of the typesetting genius (and baggage) of TeX becomes redundant once you publish to a static website. But still, the conventions have all been implemented, and people know who to write in this markup (not to mention legacy projects).
So here's my (long-winded) question: any chance gitbook might evolve to be a front-end to LaTeX, too? Maybe via Pandoc?
Am I making sense?