//

Org document export | best practice | Org -> Markdown -> HTML

I like to write demi-paragraphs in Org.
Sometimes a sentence needs its own line, like this.
For example, an address needs multiple separate lines.
If they're concatenated by an HTML export, the result can be illegible.

Org's HTML exporter doesn't preserve demi-paragraphs unless one appends two backslashes to the line, which looks ugly when reading the source document.

I would like both source and export to be legible. Is there a way to accomplish this? Yes!

Markdown recognizes two spaces appended to the line as a line break. This preserves legibility.

So exporting from Org to Markdown preserves demi-pararaphs, as long as one remembers to append the spaces.

How to get the same effect in HTML? First export from Org to Markdown. Then run gh-md-export-buffer on the Markdown buffer, exporting it to HTML.

Markdown editors are more popular than Org editors. So when sending someone a document, it's good to send three copies: Org, Markdown and HTML.

The Org version is maximally legible and navigable in plain text or Emacs. The Markdown guarantees easy cross-platform editing. The HTML guarantees pretty cross-platform viewing.

Spacemacs supports this natively, IIRC. At most one would need to install Org.

correction: I think Spacemacs needs its markdown layer to export to HTML.

Publish At: Author:Cyberthal

Read more posts by this author

Github
comments powered by Disqus