Improve doc
This commit is contained in:
parent
f7dc47480c
commit
657397acd8
File diff suppressed because it is too large
Load Diff
|
@ -10,7 +10,18 @@
|
|||
#+HTML_LINK_UP: http://www.bing.com
|
||||
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="d:/Users/fni/src/org-html-themes/styles/readtheorg/rtd.css"/>
|
||||
# #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/rtd.css"/>
|
||||
|
||||
|
||||
#+HTML_HEAD: <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
|
||||
|
||||
|
||||
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/bigblow/js/jquery-1.11.0.min.js"></script>
|
||||
|
||||
#+HTML_HEAD: <script type="text/javascript" src="d:/Users/fni/src/org-html-themes/styles/readtheorg/rtd.js"></script>
|
||||
# #+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/rtd.js"></script>
|
||||
|
||||
# #+SETUPFILE: ~/src/org-style/setup/bigblow-local-abs.setup
|
||||
|
||||
#+PROPERTY: eval yes
|
||||
|
@ -19,17 +30,18 @@
|
|||
|
||||
# #+MACRO: longtext this is a very very long text to include
|
||||
|
||||
This is an Org mode document, using the .org extension (supported by GitHub).
|
||||
This is an Org mode document, using the ~.org~ extension (supported by GitHub).
|
||||
|
||||
*Org mode* is an easy-to-write /plain text/ formatting syntax for authoring notes,
|
||||
articles, LaTeX documents, books, Web pages, Beamer slide decks and much more!
|
||||
|
||||
* Abstract
|
||||
|
||||
This is a cheatsheet for Org mode - "Your life in plain text!".
|
||||
This is a cheat sheet for *Org mode 8* (because of some markup syntax changes
|
||||
since Org mode 7), using [[https://github.com/fniessen/org-html-themes][ReadTheOrg CSS]].
|
||||
|
||||
This cheatsheet is for *Org mode 8* (because of some markup syntax changes since
|
||||
Org mode 7), using *ReadTheOrg CSS*.
|
||||
Reading through all the documentation is highly recommended, but for the truly
|
||||
impatient, following are some quick steps to get started.
|
||||
|
||||
* Document header
|
||||
|
||||
|
@ -456,7 +468,7 @@ See chapter [[#links][Links]].
|
|||
#+end_src
|
||||
|
||||
You can also create a hypertext link to a document anchor in the current
|
||||
document or in another document.
|
||||
document /or in another document/.
|
||||
|
||||
#+begin_src org
|
||||
See:
|
||||
|
@ -488,12 +500,20 @@ You can insert *image* files of different *formats* to a document:
|
|||
Click to see the [[file:org-mode-unicorn.png][Unicorn picture]].
|
||||
#+end_src
|
||||
|
||||
** Using positioning
|
||||
** Image alignment (using positioning)
|
||||
|
||||
XXX Available HTML image tags include ...
|
||||
Books usually align/float images on the right/left of the contents.
|
||||
|
||||
*** Image is left aligned
|
||||
|
||||
*** Image is right aligned
|
||||
|
||||
*** Image is centered
|
||||
|
||||
** Image attributes and values
|
||||
|
||||
XXX Available HTML image tags include ...
|
||||
|
||||
| Attribute | Value(s) |
|
||||
|--------------+-----------------------------|
|
||||
| ~:alt~ | Alternate text |
|
||||
|
@ -513,6 +533,11 @@ XXX Available HTML image tags include ...
|
|||
|
||||
Place images side by side: XXX
|
||||
|
||||
** Figures
|
||||
|
||||
To define images that will be *treated as book illustrations* (figures) and
|
||||
automatically labeled and numbered, use XXX.
|
||||
|
||||
* Videos
|
||||
|
||||
Videos can't be added directly.
|
||||
|
@ -548,29 +573,47 @@ or:
|
|||
*************** END
|
||||
#+end_src
|
||||
|
||||
#+begin_admonitiontodo
|
||||
Admonitiontodo
|
||||
#+end_admonitiontodo
|
||||
|
||||
** List of supported admonitions
|
||||
|
||||
| | Confluence | AsciiDoc | reST | Total |
|
||||
|-----------+------------+----------+------+-------|
|
||||
| note | 1 | 1 | | 2 |
|
||||
| warning | 1 | 1 | | 2 |
|
||||
| tip | 1 | 1 | | 2 |
|
||||
| important | | 1 | | 1 |
|
||||
| caution | | 1 | | 1 |
|
||||
| info | 1 | | | 1 |
|
||||
#+TBLFM: $5=vsum($2..$4)
|
||||
| Total | | reST rtd | AsciiDoc | DocBook | MoinMoin (Modern) | DocOnce | Confluence |
|
||||
|-------+-----------+----------+----------+---------+-------------------+---------+------------|
|
||||
| 5 | note | 1 | 1 | 1 | 1 | | 1 |
|
||||
| 6 | warning | 1 | 1 | 1 | 1 | 1 | 1 |
|
||||
| 5 | tip | 1 | 1 | 1 | 1 | | 1 |
|
||||
|-------+-----------+----------+----------+---------+-------------------+---------+------------|
|
||||
| 4 | important | 1 | 1 | 1 | 1 | | |
|
||||
| 4 | caution | 1 | 1 | 1 | 1 | | |
|
||||
|-------+-----------+----------+----------+---------+-------------------+---------+------------|
|
||||
| 1 | attention | 1 | | | | | |
|
||||
| 1 | danger | 1 | | | | | |
|
||||
| 1 | error | 1 | | | | | |
|
||||
| 1 | hint | 1 | | | | | |
|
||||
| 1 | seealso | 1 | | | | | |
|
||||
| 1 | todo | 1 | | | | | |
|
||||
| 1 | notice | | | | | 1 | |
|
||||
| 1 | question | | | | | 1 | |
|
||||
| 1 | summary | | | | | 1 | |
|
||||
| 1 | info | | | | | | 1 |
|
||||
#+TBLFM: $1=vsum($8..$7)
|
||||
|
||||
** Note
|
||||
|
||||
A note box is displayed as follows:
|
||||
|
||||
#+begin_note
|
||||
*Note example* \\
|
||||
This is a useful note.
|
||||
#+end_note
|
||||
|
||||
# #+attr_html: :options [By the way...]
|
||||
# #+begin_note
|
||||
# This is a useful note (with a title).
|
||||
# #+end_note
|
||||
|
||||
#+begin_seealso
|
||||
*See also* \\
|
||||
- [[http://en.wikipedia.org/wiki/Apple][Apples]] ::
|
||||
A kind of [[http://en.wikipedia.org/wiki/Fruit][fruit]].
|
||||
#+end_seealso
|
||||
|
@ -580,29 +623,20 @@ This is a useful note.
|
|||
A warning box is displayed as follows:
|
||||
|
||||
#+begin_warning
|
||||
*Warning example* \\
|
||||
Be careful! Check that you have...
|
||||
#+end_warning
|
||||
|
||||
# #+html: <p style="font-family: 'FontAwesome'>UUU UUU Warning UUU</p>
|
||||
|
||||
#+begin_caution
|
||||
Caution
|
||||
#+end_caution
|
||||
|
||||
|
||||
#+begin_attention
|
||||
Attention
|
||||
#+end_attention
|
||||
|
||||
#+begin_admonitiontodo
|
||||
Admonitiontodo
|
||||
#+end_admonitiontodo
|
||||
|
||||
** Tip
|
||||
|
||||
A tip box is displayed as follows:
|
||||
|
||||
#+begin_tip
|
||||
*Tip example* \\
|
||||
Try doing it this way...
|
||||
#+end_tip
|
||||
|
||||
|
@ -610,29 +644,7 @@ Try doing it this way...
|
|||
Important
|
||||
#+end_important
|
||||
|
||||
|
||||
#+begin_hint
|
||||
Hint
|
||||
#+end_hint
|
||||
|
||||
#+begin_success
|
||||
Success
|
||||
#+end_success
|
||||
|
||||
** Info
|
||||
|
||||
An info box is displayed as follows:
|
||||
|
||||
#+begin_info
|
||||
*Info example* \\
|
||||
Did you know...
|
||||
#+end_info
|
||||
|
||||
** Danger
|
||||
|
||||
#+begin_danger
|
||||
Danger
|
||||
#+end_danger
|
||||
** Error
|
||||
|
||||
#+begin_error
|
||||
Error
|
||||
|
@ -646,20 +658,22 @@ Neutral
|
|||
|
||||
* Centered text
|
||||
|
||||
#+begin_left
|
||||
#+begin_src org
|
||||
,#+begin_left
|
||||
This text is \\
|
||||
aligned to the left!
|
||||
#+end_left
|
||||
,#+end_left
|
||||
|
||||
#+begin_center
|
||||
,#+begin_center
|
||||
This text is \\
|
||||
centered!
|
||||
#+end_center
|
||||
,#+end_center
|
||||
|
||||
#+begin_right
|
||||
,#+begin_right
|
||||
This text is \\
|
||||
aligned to the right!
|
||||
#+end_right
|
||||
,#+end_right
|
||||
#+end_src
|
||||
|
||||
* Sidebar
|
||||
|
||||
|
@ -672,9 +686,9 @@ cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
|||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
|
||||
,#+begin_sidebar
|
||||
Org mode was first released in 2004 (?) by Carsten Dominik. It was designed from
|
||||
the start to be a shorthand syntax for producing professional documents like
|
||||
LaTeX.
|
||||
Org mode was first released by Carsten Dominik in 2004 as an outlining and
|
||||
project planning tool. Further development turned it into a general tool that
|
||||
can be used to author professional documents like LaTeX.
|
||||
,#+end_sidebar
|
||||
|
||||
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac
|
||||
|
@ -815,12 +829,11 @@ pull-quote
|
|||
Blockquote
|
||||
#+end_blockquote
|
||||
|
||||
** Spaces
|
||||
** Non-breaking space
|
||||
|
||||
Using non-breaking spaces.
|
||||
Insert the Unicode character ~00A0~ to add a non-breaking space.
|
||||
|
||||
Insert the Unicode character ~00A0~ to add a non-breaking space. FIXME
|
||||
Or add/use an Org entity?
|
||||
FIXME Or add/use an Org entity? Or use tilde?
|
||||
|
||||
* Comments
|
||||
|
||||
|
@ -830,7 +843,9 @@ It's possible to add comments in the document.
|
|||
# This Org comment here won't be displayed.
|
||||
#+end_src
|
||||
|
||||
* Substitutions (macros)
|
||||
* Substitutions
|
||||
|
||||
** General replacements
|
||||
|
||||
#+begin_src org :eval no
|
||||
,#+MACRO: longtext this very very long text
|
||||
|
@ -842,6 +857,8 @@ Insert {{{longtext}}} wherever required.
|
|||
|
||||
Insert {{{longtext}}} wherever required.
|
||||
|
||||
** Styled references
|
||||
|
||||
#+BEGIN_SRC org :eval no
|
||||
,#+MACRO: color @@html:<span style="color: $1">$2</span>@@
|
||||
|
||||
|
@ -858,6 +875,55 @@ Insert {{{longtext}}} wherever required.
|
|||
|
||||
Find more macros on [[https://github.com/fniessen/org-macros][GitHub]].
|
||||
|
||||
** Special characters
|
||||
|
||||
We also use substitutions to include some of the widely used Unicode characters
|
||||
(like ©, converted from text characters to its typographically correct entity).
|
||||
|
||||
*** Accents
|
||||
|
||||
#+begin_src org
|
||||
- \Agrave \Aacute
|
||||
#+end_src
|
||||
|
||||
*** Punctuation
|
||||
|
||||
#+begin_src org
|
||||
- Dash: \ndash \mdash
|
||||
- Marks: \iexcl \iquest
|
||||
- Quotations: \laquo \raquo
|
||||
- Miscellaneous: \para \ordf
|
||||
#+end_src
|
||||
|
||||
*** Commercial symbols
|
||||
|
||||
#+begin_src org
|
||||
- Property marks: \copy \reg
|
||||
- Currency: \cent \EUR \yen \pound
|
||||
#+end_src
|
||||
|
||||
*** Greek characters
|
||||
|
||||
#+begin_src org
|
||||
The Greek letters \alpha, \beta, and \gamma are used to denote angles.
|
||||
#+end_src
|
||||
|
||||
*** Math characters
|
||||
|
||||
#+begin_src org
|
||||
- Science: \pm \div
|
||||
- Arrows: \to \rarr \larr \harr \rArr \lArr \hArr
|
||||
- Function names: \arccos \cos
|
||||
- Signs and symbols: \bull \star
|
||||
#+end_src
|
||||
|
||||
*** Misc
|
||||
|
||||
#+begin_src org
|
||||
# Smilies: \smiley \sad
|
||||
- Suits: \clubs \spades
|
||||
#+end_src
|
||||
|
||||
* Source code
|
||||
|
||||
** Inline code
|
||||
|
@ -868,7 +934,7 @@ Reference code like ~variables~ or ~functions~ inline.
|
|||
|
||||
You can also evaluate code inline as follows: 1 + 1 is src_R{1 + 1}.
|
||||
|
||||
** Code block with syntax highlighting
|
||||
** Code blocks (with syntax highlighting)
|
||||
|
||||
The source code blocks support syntax highlighting:
|
||||
|
||||
|
@ -883,6 +949,8 @@ int main(int arc, char **argv)
|
|||
}
|
||||
#+end_src
|
||||
|
||||
** Source mode
|
||||
|
||||
The following language strings are currently recognized:
|
||||
|
||||
#+begin_src emacs-lisp :results drawer :exports results
|
||||
|
@ -905,6 +973,8 @@ The following language strings are currently recognized:
|
|||
Awk, C, R, Asymptote, Calc, Clojure, CSS, Ditaa, Dot, Emacs Lisp, Fortran, Gnuplot, Haskell, IO, J, Java, Javascript, LaTeX, Ledger, Lilypond, Lisp, Makefile, Maxima, Matlab, Mscgen, Ocaml, Octave, Org, Perl, Pico Lisp, PlantUML, Python, Ruby, Sass, Scala, Scheme, Screen, Shell Script, Shen, Sql, Sqlite, ebnf2ps.
|
||||
:END:
|
||||
|
||||
** Line break
|
||||
|
||||
Code block with long lines:
|
||||
|
||||
#+begin_src emacs-lisp :eval no
|
||||
|
@ -962,55 +1032,6 @@ parentheses. Here is an example:
|
|||
In line [[(sc)]], we remember the current position. [[(jump)][Line (jump)]] jumps to
|
||||
~point-min~.
|
||||
|
||||
** Special characters
|
||||
|
||||
Some of the widely used special characters (converted from text characters to
|
||||
their typographically correct entities):
|
||||
|
||||
*** Accents
|
||||
|
||||
#+begin_src org
|
||||
- \Agrave \Aacute
|
||||
#+end_src
|
||||
|
||||
*** Punctuation
|
||||
|
||||
#+begin_src org
|
||||
- Dash: \ndash \mdash
|
||||
- Marks: \iexcl \iquest
|
||||
- Quotations: \laquo \raquo
|
||||
- Miscellaneous: \para \ordf
|
||||
#+end_src
|
||||
|
||||
*** Commercial symbols
|
||||
|
||||
#+begin_src org
|
||||
- Property marks: \copy \reg
|
||||
- Currency: \cent \EUR \yen \pound
|
||||
#+end_src
|
||||
|
||||
*** Greek characters
|
||||
|
||||
#+begin_src org
|
||||
The Greek letters \alpha, \beta, and \gamma are used to denote angles.
|
||||
#+end_src
|
||||
|
||||
*** Math characters
|
||||
|
||||
#+begin_src org
|
||||
- Science: \pm \div
|
||||
- Arrows: \to \rarr \larr \harr \rArr \lArr \hArr
|
||||
- Function names: \arccos \cos
|
||||
- Signs and symbols: \bull \star
|
||||
#+end_src
|
||||
|
||||
*** Misc
|
||||
|
||||
#+begin_src org
|
||||
# Smilies: \smiley \sad
|
||||
- Suits: \clubs \spades
|
||||
#+end_src
|
||||
|
||||
* Math
|
||||
|
||||
You can embed LaTeX math formatting in Org mode files.
|
||||
|
@ -1021,6 +1042,9 @@ For *inline math* expressions, use ~\(...\)~:
|
|||
|
||||
#+begin_src org
|
||||
The formula \(a^2 + b^2 = c^2\) has been discovered by Pythagoras.
|
||||
|
||||
Let \(a=\sin(x) + \cos(x)\). Then \(a^2 = 2\sin(x)\cos(x)\) because \(\sin^2x +
|
||||
\cos^2x = 1\).
|
||||
#+end_src
|
||||
|
||||
#+begin_warning
|
||||
|
@ -1174,7 +1198,7 @@ contents is visible.
|
|||
|
||||
That can be changed by adding such a line (into your Org document):
|
||||
|
||||
#+begin_src org
|
||||
#+begin_src org :eval no
|
||||
,#+HTML_HEAD: <script> var HS_STARTUP_FOLDED = true; </script>
|
||||
#+end_src
|
||||
|
||||
|
@ -1321,6 +1345,8 @@ library(ggplot2)
|
|||
qplot(speed, dist, data = cars) + geom_smooth()
|
||||
#+end_src
|
||||
|
||||
* Index
|
||||
|
||||
* Glossary
|
||||
|
||||
* Bibliography
|
||||
|
|
Loading…
Reference in New Issue