org-howto/orgpub/org-examples.org

3.2 KiB

org-mode examples / tutorial

#

#

Introduction

Eric Nielsen, Jr. has a lovely document describing how to do various useful things with org-mode. This is my attempt to follow in his footsteps. You can read the original here: http://ehneilsen.net/notebook/orgExamples/org-examples.html

Links

Links I found useful here:

org-mode header

Lines that begin with #+ are treated as org-mode instructions.

org-publish

Several org-exporter options are gathered under the #+options tag.

subscripts

,#+options: ^:{}

controls whether text like a_b is understood as a_b or ab. the brackets mean that we need to write

a_{b}

to get the result ab

html

The following options apply only to the html exporter:

attach a stylesheet

 #+html_head: <link rel="stylesheet" type="text/css" href="../css/notebook.css" />

This embeds the text

<link rel="stylesheet" type="text/css" href="../css/notebook.css" />

in the <head> section of the exported .html file I'm using Eric Nielsen Jr.'s notebook.css file:

use infojs (javascript texinfo-style navigation)

#+INFOJS_OPT: view:showall toc:nil path:/ext/org/org-info.js

If you omit the path option, then the generated html will get org-info.js from http://orgmode.org/orginfo.js I like to copy the file locally (e.g. to $HOME/Dropbox/public_html/ext/org/orginfo.js) so that I can count on navigation working when my laptop isn't connected to the interwebs.

…to be continued…

quoting literal text

See also: http://orgmode.org/manual/Literal-examples.html org-mode manual Place text to be quoted between #+begin_example and #+end_example brackets:

  #+begin_example
  To be, or not to be, that is the question.
  #+end_example

displays as:

To be, or not to be, that is the question.

embedding mathematics

See reference here: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference

Use $..$ to bracket inline formulae:

For example: $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$ appears inline.

use $$..$$ to bracket out-of-line formulae: