hatmatrix
hatmatrix

Reputation: 44892

Emacs org-mode: org to html conversion -- semi-complicated literal tags

How can I include ~ in between literal tags so that the end result is <code>~/.emacs</code>? Obviously, ~~/.emacs~ won't work...

Similarly, how can I make something italic within literal tags so that the result is <code>something something <i>italicize</i></code>? Obviously, ~something something /italicize/~ won't work...

(I am using the default functions used with org-publish-project for the conversion.)

Upvotes: 2

Views: 432

Answers (1)

Dave Bacher
Dave Bacher

Reputation: 15972

To include the ~ character in monospaced formatting, you could use code markup: =~/.emacs=. The HTML output appears to be the same for me. I had inconsistent results with including ~ in the verbatim markup, e.g. ~/~/.emacs~ seems to work, but your example doesn't.

According to the org-mode manual, Emphasis and monospace section:

Text in the code and verbatim string is not processed for Org-mode specific syntax; it is exported verbatim.

So, to get the formatting you desire in the literal tags, you need to use HTML and escape it:

~something something @<i>italicize@</i>~

See Quoting HTML tags for more details.

Upvotes: 1

Related Questions