Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between code and verbatim in Org-mode?

Tags:

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

like image 229
ezequiel-garzon Avatar asked Sep 24 '13 21:09

ezequiel-garzon


People also ask

What is the point of Org mode?

Org mode is routinely used to build and manage complex workflows. It does this using an elegantly simple syntax that scales from basic markup to full LaTeX typesetting and from plain text notes to literate programs. Everything you need to get started is demonstrated in the example.

How do I use Emacs Org mode?

Emacs does not actually understand you are editing an Org document, yet. To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document. Those are minuses, not underscores.


2 Answers

Same for LaTeX...

Though, as they are fontified differently in your buffer, you can use them for different semantics.

Personally, I use "code" for var/func names, commands to be typed, etc; and "verbatim" for paths or file names.

I would have loved to have the same number of markups as there are in TeX Info, but that's not the case...

like image 186
fniessen Avatar answered Sep 28 '22 15:09

fniessen


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.

like image 40
Jonathan Leech-Pepin Avatar answered Sep 28 '22 15:09

Jonathan Leech-Pepin