Editing files

To justify a block of text, select the block and type: M-q or M-x fill-paragraph

The default value is held in the fill-column variable and is 70. You can change it in the local buffer C-x f followed by the number you want.

# for a width other than 70 (default)
C-x f 100
# justify selected block
M-q

Another method:

Ctrl-Space to mark the block
C-u 70 M-x fill-region

Org Mode Commands

To insert a default template into the HEADER.org document, use: c-c c-e #, then type 'default'.

subscript upon export

One of the formatting options involves superscripting or subscripting: ^:t upon export. For instance this option will cause an underscore to subscript any following text. To disable this, change the t to either nil, or curly braces. With curly braces you retain the ability to subscript by underscore, but curly braces are required, e.g. my_{subscriptedword}. Whereas using nil disables it altogether.

OPTIONS

t = always nil = never

Common Options

Often in org mode documents you'll see an OPTIONS line:

#+OPTIONS:   H:4 num:t toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
#+OPTIONS:   email:T author:T creator:T timestamp:T

How 'the hell are you supposed to interpret that? Some common options are shown below.

H:         set the number of headline levels for export
num:       turn on/off section-numbers
toc:       turn on/off table of contents, or set level limit (integer)
\n:        turn on/off line-break-preservation
@:         turn on/off quoted HTML tags
::         turn on/off fixed-width sections
|:         turn on/off tables
^:         turn on/off TeX-like syntax for sub- and superscripts.  If
you write "^:{}", a_{b} will be interpreted, but
the simple a_b will be left as it is.
-:         turn on/off conversion of special strings.
f:         turn on/off footnotes like this[1].
todo:      turn on/off inclusion of TODO keywords into exported text
tasks:     turn on/off inclusion of tasks (TODO items), can be nil to remove
all tasks, todo to remove DONE tasks, or list of kwds to keep
pri:       turn on/off priority cookies
tags:      turn on/off inclusion of tags, may also be not-in-toc
<:         turn on/off inclusion of any time/date stamps like DEADLINES
*:         turn on/off emphasized text (bold, italic, underlined)
TeX:       turn on/off simple TeX macros in plain text
LaTeX:     configure export of LaTeX fragments.  Default auto
skip:      turn on/off skipping the text before the first heading
author:    turn on/off inclusion of author name/email into exported file
email:     turn on/off inclusion of author email into exported file
creator:   turn on/off inclusion of creator info into exported file
timestamp: turn on/off inclusion creation time into exported file
d:         turn on/off inclusion of drawers

To add additional empty lines, i.e. space between paragraphs, or space after a table, etc. you can use a double slash:

\\


Five dashes in a row equals horizontal rule
-----

tangle

#+PROPERTY: tangle yes
#+PROPERTY: tangle Myanalysis.R

Using tangle is a way to export code blocks to a file. The lines above will allow code blocks to be exported to the file (or path) named in the second line.

exports

#+PROPERTY: exports both

The exports property determines what happens to code blocks upon export from org to something else (e.g. HTML). The options are code|results|both|none.

(or path) named in the second line.

Emacs (last edited 2023-02-15 16:58:50 by ChrisSeidel)