Preserve Formatting in Org Mode

This document explains how to preserve formatting like in literal examples inside Org Mode ,i.e they should not be subjected to markup.

Some example from a text file.

If the example is source code from a programming language, the usual facilities offerred by Emacs like Font Lock, so that the example looks like fontified emacs buffer. One needs to mention the major Mode

(defun org-xor (a b)
  "Exclusive or."
  (if a (not b) b))

Because the β€˜#+BEGIN’ … β€˜#+END’ patterns need to be added so often, a shortcut is provided (see Structure Templates).

C-c ’ (org-edit-special)

Source: https://orgmode.org/manual/Literal-Examples.html β†—


Β© Prabu Anand K 2020-2026