Say I want to escape characters in org-mode, e.g. _
so that org-mode renders the following:
* _TARGET_
In my set up (which I think is the default one) org-mode underlines the word as opposed to rendering _TARGET_
More generally, where can I find information about how to escape characters in Emacs org-mode?
Use the backslash character to escape a single character or symbol. Only the character immediately following the backslash is escaped.
Escape characters. Escape characters are used to remove the special meaning from a single character. A non-quoted backslash, \, is used as an escape character in Bash. It preserves the literal value of the next character that follows, with the exception of newline.
Characters and escape sequences that must be escaped To escape a double quotation mark ( " ), use the sequence \" to search for a literal double quotation mark. To escape a backslash character ( \ ), use the sequence \\ to search for a backslash.
The code and verbatim markup will render the text inside as-is, without interpretation. Therefore, =_TARGET_=
will probably work as you intend (you'll also get a different monospace typeface for that word).
If you want to break org to interpret some syntax you are using, you will have to ways to do that.
_
is \under
and *
is \ast
, so you can write like this \ast \under{}TARGET\under
;zero width space
, its code is 200B
, so you can use C-x 8 RET 200b RET
to insert a zero width space to break the interpreting.They work on the latest org on the responding time (latest 9.2).
Alternatively, use the normal shell backslash to escape the characters you want to avoid Org-mode interpreting as markup:
* \_TARGET\_
The backslash characters are visible in your Emacs buffer, but are hidden when exporting - e.g. to HTML or PDF-via-LaTeX.
This escaping works in many other situations, e.g. SR\_1234
to render as SR_1234
during export rather than as a subscript.
With a current Emacs and org-mode you might try
* \under{}TARGET\under{}
If that is not automagically displayed as * _TARGET_
just try C-c C-x \
, that should toggle the display of those codings between coding characters and coded character.
(In principle the same as I explained here.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With