emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: single file export in HTML (as easy as PDF) (well, almost)
Date: Sun, 23 Oct 2016 19:26:29 +0200	[thread overview]
Message-ID: <580CF2C5.2020103@free.fr> (raw)

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	other threads:[~2016-10-23 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-23 17:26 Thierry Banel [this message]
2016-10-23 18:23 ` single file export in HTML (as easy as PDF) (well, almost) Ken Mankoff
2016-10-23 19:25   ` Thomas S. Dye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=580CF2C5.2020103@free.fr \
    --to=tbanelwebmin@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).