emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] single file export in HTML (as easy as PDF) (well, almost)


From: Thierry Banel
Subject: [O] single file export in HTML (as easy as PDF) (well, almost)
Date: Sun, 23 Oct 2016 19:26:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

A single, nicely packaged, PDF file, easy to distribute:this is one of
the appealing features of PDF export.

But actually, this can be achieved in HTML, out-of-the-box with Org Mode
and Firefox.

My recipe:

- Write your book in Org Mode, with any content you want:
  + tables, headers, bullet lists, whatever
  + PNG or SVG images (file:myimage.svg)
  + Ditaa    (#+begin_src ditaa :file myditaa.png)
  + Gnuplot  (#+begin_src gnuplot :file mygnuplot.svg)
  + GraphViz (#+begin_src dot :file mygraphviz.png)
  + MathJax  (#+html_mathjax: align: left) ($$\sqrt{x+1}$$)

- Add HTML formatting (optional)
  + CSS to customize fonts, colors, sizes, layout
    (#+html:<link rel="stylesheet" href="my.css"/>)
  + InfoJS to expand-collapse in the browser as in Org Mode
    (#+infojs_opt: view:info toc:nil ...)

- Export & package to a single file
  + C-c C-e h h
  + zip the whole directory to mybook.zip
    (along with SVG, PNG images, CSS style-sheets, JS)

- Distribute your book
  + send mybook.zip to your friends and colleagues
  + ask them to point their Firefox to
    jar:file://mybook.zip!/mybook/mybook.html

The magic Firefox feature is the jar-bang trick which allows browsing
within a ZIP.

If someone knows a less cryptic syntax, it would be great.Also, this
trick only works in Firefox. Is there something similar in other browsers?

Have fun
TB




reply via email to

[Prev in Thread] Current Thread [Next in Thread]