Search code examples
emacsorg-mode

Difference between code and verbatim in Org-mode?


What is the intended difference between ~code~ and =verbatim= markup in Org-mode? Exporting to HTML in both cases yields <code> tags.


Solution

  • In Org 8.0 (ox-* exporters) there are a few differences.

    In LaTeX

    • Code comes out as `\verb{sep}content{sep} where {sep} is found as an appropriate delimiter.
    • Verbatim comes out as \texttt{content} with certain characters escaped/protected.

    In HTML and ODT

    Code and Verbatim are treated identically

    In TeXInfo

    The same behaviour is followed as in LaTeX.