Hacker News new | ask | show | jobs
by globuous 3065 days ago
I've been using org-mode and exporting it to HTML. Then making an @media(print) style sheet and exporting the HTML/printCSS to PDF through princeXML.

It's been amazing. Latex equations are exported as pngs (for PDF export because I don't think prince does Mathjax, but org mode can export to mathjax). I have my bibliography with bibtex2html. And templating my pdfs becomes so much easier than with latex. It's just HTML CSS !! My figures are numbered and captioned and referenced throughout the text, same for tables. And my table of content is generated. And code is highlighted. And I have access to ditaa for ascii flow charts and a bunch of other stuff (for making uml in ascii with png export for the PDF for example). It also handles excel like tables with formulae (possible to have lisp formulae !! So cool !!) in text mode !!. And of course, you can plot your table through gnuplot inside your org file. You tell it which columns and rows, the type of graph etc :)

It's also easy to include other org files, or to go down to raw HTML for the export (rather than org mode->HTML) if need be (for a picture than spans over 2 pages for instance).

Give it a try, you might like it ;) In the end it's just an org mode export to HTML to PDF with the print CSS media query. But it works remarkably well and you have all the org mode features.

2 comments

Any particular reason why you don't use org-mode's latex export (org-latex-export-to-pdf / C-c C-e l p) directly? It will render math nicely, not as embedded images, etc.
It's really because of theming. I was trying to theme my latex document, but it don't know tex well. I do know CSS well though. So theming my header, my margins, my bloquotes, my images etc is very easy in CSS. I have no idea how to achieve this easily with tex.
> Latex equations are exported as pngs (for PDF export because I don't think prince does Mathjax, but org mode can export to mathjax).

Prince does MathML, at least, if you want to avoid images.