From a298979eb209beac9b84757dd0f9571e722a4081 Mon Sep 17 00:00:00 2001 From: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")> Date: Fri, 6 Mar 2015 09:33:36 +0100 Subject: [PATCH] Improve doc about R and Dot --- demo/org-mode-syntax.html | 877 +++++++++++++++++--------------------- demo/org-mode-syntax.org | 27 +- 2 files changed, 411 insertions(+), 493 deletions(-) diff --git a/demo/org-mode-syntax.html b/demo/org-mode-syntax.html index 7e8a9d3..810e7b2 100755 --- a/demo/org-mode-syntax.html +++ b/demo/org-mode-syntax.html @@ -49,147 +49,32 @@
* Biggest heading (level 1)
New chapter.
+
+
-** Bigger heading (level 2)
+** Bigger heading (level 2)
New section.
@@ -329,34 +218,25 @@ New sub-sub-section.
-New chapter. -
-New section.
New sub-section.
New sub-sub-section.
@@ -365,9 +245,9 @@ New sub-sub-section.You can create numbered headings up to a certain level by setting an option:
@@ -381,12 +261,12 @@ You can create numbered headings up to a certain level by setting an option:A single newline has no effect. @@ -413,9 +293,9 @@ demarcates paragraphs.
By entering two consecutive backslashes, \\ @@ -432,9 +312,9 @@ without starting a new paragraph.
For an horizontal line, insert at least 5 dashes: this is some text above an @@ -455,9 +335,9 @@ and some text below it.
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, @@ -470,17 +350,17 @@ compared with the size of the rest of him, waved about helplessly as he looked.
Text effects.
Emphasize (italics), strongly (bold), and /very strongly/ (bold italics). @@ -527,9 +407,9 @@ bold.*
Other elements to use sparingly are:
@@ -539,8 +419,8 @@ Other elements to use sparingly are:- monospaced typewriter font for inline code - monospaced typewriter font for verbatim text - +deleted+ text (vs. inserted text) -- text with super (for example: m/s^{2} gives m/s ) -- text with sub +- text with super , such as gives m/s or E=mc +- text with sub , such as H O
inline code
verbatim text
m/s^{2}
gives m/s2)Org markup allows you to create bulleted or numbered lists. It allows any combination of the two list types.
Itemized lists are marked with bullets. Create them with a minus or a plus sign.
@@ -600,9 +480,9 @@ a few words to really show the line wrapping.- [X] Checked.
@@ -621,9 +501,9 @@ a few words to really show the line wrapping.
Enumerated lists are marked with numbers or letters:
@@ -672,9 +552,9 @@ You can have ordered lists with jumping numbers:Labeled, multi-line lists.
@@ -707,9 +587,9 @@ In many paragraphs.Adjacent lists sometimes like to fuse. To force the start of a new list, offset the two lists by an empty line comment: @@ -744,18 +624,18 @@ the two lists by an empty line comment:
Tables are one of the most refined areas of the Org mode syntax. They are very easy to create and to read.
| Cell in column 1, row 1 | Cell in column 2, row 1 |
@@ -786,9 +666,9 @@ to create and to read.
Columns are automatically aligned:
@@ -799,9 +679,9 @@ Columns are automatically aligned:
If you want to override the automatic alignment, use <r>
, <c>
or <l>
.
<r>
, You can create tables with an header row (by using an horizontal line of dashes to separate it from the rest of the table). @@ -913,9 +793,9 @@ to separate it from the rest of the table).
@@ -979,12 +859,12 @@ XXX Different from the following:
Here is a table on the left side:
@@ -1040,9 +920,9 @@ table, so it pushes the table to the left.Here is a centered table:
@@ -1090,9 +970,9 @@ Here is a centered table:And here’s a table on the right side:
@@ -1148,9 +1028,9 @@ to the right.
@@ -1182,9 +1062,9 @@ to the right.
You can fill table from CSV file using R commands.
@@ -1193,7 +1073,7 @@ You can fill table from CSV file using R commands.
This document is available in plain text, HTML and PDF.
@@ -1204,9 +1084,9 @@ The links are delimited by [square brackets]
.
See http://www.pirilampo.org (automatic!) and the @@ -1220,9 +1100,9 @@ See http://www.pirilampo.org/ (automatic
Home @@ -1235,9 +1115,9 @@ See http://www.pirilampo.org/ (automatic
email John Doe @@ -1251,14 +1131,14 @@ See http://www.pirilampo.org/ (automatic
Anchors are used to specify hypertext link targets.
@@ -1275,9 +1155,9 @@ Anchors are used to specify hypertext link targets.Links generally point to an headline.
@@ -1310,20 +1190,20 @@ See:You can insert image files of different formats to a document:
@@ -1373,9 +1253,9 @@ You can insert image files of different formats to a document:Org mode logo @@ -1402,30 +1282,30 @@ Click to see the Unicorn picture.
Books usually align/float images on the right/left of the contents.
XXX Available HTML image tags include …
@@ -1511,9 +1391,9 @@ Place images side by side: XXXTo define images that will be treated as book illustrations (figures) and automatically labeled and numbered, use XXX. @@ -1522,9 +1402,9 @@ automatically labeled and numbered, use XXX.
Videos can’t be added directly.
@@ -1547,9 +1427,9 @@ Though, you can add an image with a link to the video like this:Admonitions are statements taken out of the content’s flow and labeled with a title. @@ -1572,9 +1452,9 @@ Common admonitions are:
A note box is displayed as follows:
@@ -1612,9 +1492,9 @@ This is a useful note.A warning box is displayed as follows:
@@ -1651,9 +1531,9 @@ CautionA tip box is displayed as follows:
@@ -1690,9 +1570,9 @@ Important#+begin_error
@@ -1710,9 +1590,9 @@ Error
Simple box (“inline task”):
@@ -1761,9 +1641,9 @@ Admonitiontodo#+begin_left
@@ -1808,9 +1688,9 @@ aligned to the right!
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod @@ -1876,9 +1756,9 @@ commodo. Curabitur accumsan. Nam sed metus. Etiam tristique bibendum justo.
You can have example
blocks.
Use the quote
block for content that doesn’t require the preservation of line
breaks.
@@ -2008,9 +1888,9 @@ but not any simpler. – Albert Einstein
In a verse
environment, there is an implicit line break at the end of each line,
and indentation is preserved:
@@ -2064,9 +1944,9 @@ preserved.
epigraph @@ -2076,9 +1956,9 @@ epigraph
highlights @@ -2102,9 +1982,9 @@ Blockquote
Insert the Unicode character 00A0
to add a non-breaking space.
It's possible to add comments in the document. @@ -2133,12 +2013,12 @@ It’s possible to add comments in the document.
@@ -2153,9 +2033,9 @@ Insert this very very long text wherever required.
GitHub.@@ -2180,18 +2060,18 @@ Find more macros on
We also use substitutions to include some of the widely used Unicode characters (like ©, converted from text characters to its typographically correct entity).
-
@@ -2204,9 +2084,9 @@ We also use substitutions to include some of the widely used Unicode characters
- Dash:
@@ -2225,9 +2105,9 @@ We also use substitutions to include some of the widely used Unicode characters
- Property marks:
@@ -2242,9 +2122,9 @@ We also use substitutions to include some of the widely used Unicode characters
The Greek lettersand are used to denote angles. @@ -2257,9 +2137,9 @@ The Greek letters α, β, and γ are used to denote angles.
- Science:
@@ -2278,9 +2158,9 @@ The Greek letters α, β, and γ are used to denote angles.
# Smilies: \smiley \sad
@@ -2296,12 +2176,12 @@ The Greek letters α, β, and γ are used to denote angles.
Reference code like variables or functions inline.
@@ -2319,9 +2199,9 @@ You can also evaluate code inline as follows: 1 + 1 is <
The source code blocks support syntax highlighting:
@@ -2341,9 +2221,9 @@ The source code blocks support syntax highlighting:The following language strings are currently recognized:
@@ -2354,9 +2234,9 @@ Awk, C, R, Asymptote, Calc, Clojure, CSS, Ditaa, Dot, Emacs Lisp, Forth, FortranCode block with long lines:
@@ -2385,9 +2265,9 @@ This block is in scriptsize
Both in example
and in src
snippets, you can add a -n
switch to the end of the
begin
line, to get the lines of the example numbered.
@@ -2413,9 +2293,9 @@ be continued in the current one:
In literal examples, Org will interpret strings like
You can embed LaTeX math formatting in Org mode files.
For inline math expressions, use
For mathematical expressions which you want to make stand out, centered on their
own lines, use
Differently from
You can include another Org file and skip its title by using the
You can include raw HTML in your Org documents and it will get kept as HTML
when it’s exported. XXX
@@ -2687,9 +2567,9 @@ Don’t edit the exported HTML file!
You can also use raw LaTeX. XXX
Timestamps:
By default,
@@ -2773,9 +2653,9 @@ That can be changed by adding such a line (into your Org document):
This section will be collapsed when loading the page because the entry has the
@@ -2788,9 +2668,9 @@ Powerful, no?
You can add tags to any entry, and hightlight all entries having some specific
tag by clicking on the buttons made accessible to you in the “Dashboard”.
@@ -2798,9 +2678,9 @@ tag by clicking on the buttons made accessible to you in the “Dashboard&rd
Now, you can even make your weekly review in the HTML export… Press the
The string
To enable the Graphviz extension, we have to add it to the extensions list in
-conf.py:
+the
-extensions = [‘sphinx.est.graphviz’]
-
-It uses directly the dot command to process DOT language.
+It uses directly the
The output from the execution of programs, scripts or commands can be inserted
in the document itself, allowing you to work in the reproducible research
mindset.
+To enable the Graphviz extension, we have to add it to the extensions list in
+the
+It uses directly the
A one-liner result:
Data to be charted:
The resulting chart:
(ref:name)
as labels, and
use them as targets for special hyperlinks like [[(name)]]
(i.e., the reference
@@ -2446,17 +2326,17 @@ In line
-Math
-Math
+Inline math expressions
-Inline math expressions
+\(...\)
:
$...$
(both for
Math expressions in display mode
-Math expressions in display mode
+\[...\]
:
@@ -2533,9 +2413,9 @@ Double dollar signs ($$
) should not be used.
Equation numbers
-Equation numbers
+$...$
and \(...\)
, an equation environment produces a numbered
equation to which you can add a label and reference the equation by (label) name
@@ -2609,12 +2489,12 @@ Other alternatives: use
Miscellaneous effects
-Include Org files
-Miscellaneous effects
+Include Org files
+:lines
argument
to #+INCLUDE
:
@@ -2635,9 +2515,9 @@ File inclusion, through INCLUDE keywords, is an export-only feature.
Inline HTML
-Inline HTML
+Inline LaTeX
-Inline LaTeX
+Notes at the footer
-Notes at the footer
+It is possible to define named footnotes[fn:myfootnote], or ones with automatic
@@ -2718,28 +2598,28 @@ anchors2.
Useful extensions
-Todo extension
-Dates
-Useful extensions
+Todo extension
+Dates
+TODO We need to achieve…
+TODO We need to achieve…
DONE [A] Buy GTD book online
-DONE [A] Buy GTD book online
+DONE
actions will be collapsed.
TODO [A] Read GTD book
-TODO [A] Read GTD book
+TODO [B] Apply GTD methodoloy
-TODO [B] Apply GTD methodoloy
+Some note computer write
-Some note computer write
+Weekly review computer
-Weekly review computer
+r
key
to start entering the “review mode” where all but one active entry are
@@ -2810,9 +2690,9 @@ collapsed, so that you can really focus on one item at a time!
Bigblow extension
-Bigblow extension
+fixme
(in upper case) gets replaced by a “Fix Me!” image:
Graphs with Graphviz
-Graphs with Graphviz
+org-babel-load-languages
variable.
(org-babel-do-load-languages 'org-babel-load-languages '((dot . t)))
+
+
+((dot . t))
+
dot
command to process DOT language.
Undirected
-Undirected
+#+begin_src dot :file images/graph.png :cmdline -Tpng
@@ -2876,9 +2762,9 @@ graph foo {
Directed
-Directed
+digraph foo {
@@ -2896,19 +2782,38 @@ graph foo {
Graphs with R
-Graphs with R
+org-babel-load-languages
variable.
+(org-babel-do-load-languages 'org-babel-load-languages '((R . t)))
+
Text
-
+((R . t))
+
+
+R
command to process R language.
+Text
+
-2015-03-05
+2015-03-06
Example
-Example
+Graph
-Graph
+R code block
-R code block
+library(ggplot2)
@@ -3062,16 +2967,16 @@ Plot:
Index
+Index
+Glossary
Glossary
-Bibliography
+Bibliography
Footnotes:
@@ -3094,9 +2999,9 @@ non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.