How do I escape slash in org-mode?
emacs, org-mode
Solution
Put a zero-width space (U+200B; insert in Emacs using Ctrl-x 8 RET 200B RET) between the whitespace and the forward slash.
org-mode text
What do we see?
- /foo/
- /foo/
with a zero-width space inserted just before the first forward slash on the second "foo" line (not visible, because it has zero width) yields the following HTML after exporting:
<div id="content">
<h1 class="title">What do we see?</h1>
<ul>
<li><i>foo</i>
</li>
<li>/foo/
</li>
</ul>
</div>
The zero-width space is exported, too, and ends up between the `<li>` and the `/foo/` where you'd expect it.
Problem
Take `foo /bar/ baz` as example, when exported to HTML, it becomes `foo <i>bar</i> baz`, now I want to export it with the original style `foo /bar/ baz`, how to achieve this ? I have tried `foo \/bar\/ baz`, but the output becomes `foo \/bar\/ baz`. I know this is an easy question, I have googled a lot, but only find this one: Escape pipe-character in org-mode, the answer says slash escaping works fine, but for me, it seems not fine. edit: After searching org mode mailing list, I find a discussion and solution here: http://thread.gmane.org/gmane.emacs.orgmode/50743 There are two ways to do this: - set option `#+OPTIONS: *:nil` to turn off all emphasis symbols - modify variable `org-emphasis-alist`, remove relevant content For me, the first solution is acceptable, and also it is simple.