Using org-mode for editing plain text files is a great experience. The structured editing of the document is very powerful.
\begin{noteblock} There does not seem to be a reference file out there with everything org-mode has to offer, so this is an attempt to make one. \end{noteblock}
Many of the below examples are taken from fniessen’s refcard.
/Emphasize/ (italics), *strongly* (bold), and */very strongly/* (bold italics).
Emphasize (italics), strongly (bold), and /very strongly/ (bold italics).
- monospaced typewriter font for ~inline code~
- monospaced typewriter font for =verbatim text=
- +deleted text+ (vs. _inserted text_)
- text with super^{script}, such as 2^{10}
- text with sub_{script}, such as H_{2}O
- monospaced typewriter font for
inline code
- monospaced typewriter font for
verbatim text
deleted text(vs. inserted text)- text with superscript, such as 210
- text with subscript, such as H2O
- one item
- two item
- sub item
- sub sub item
- one item
- two item
- sub item
- sub sub item
- sub item
1. numbered
2. also
3. and another
1. sub item
2. sub item
- numbered
- also
- and another
- sub item
- sub item
- [X] Checked.
- [-] Half-checked.
- [ ] Not checked.
- Normal list item.
- [X] Checked.
- [-] Half-checked.
- [ ] Not checked.
- Normal list item.
- First term to define ::
Definition of the first term. We add a few words to show the line wrapping,
to see what happens when you have long lines.
- Second term ::
Explication of the second term with *inline markup*.
In many paragraphs.
- First term to define
- Definition of the first term. We add a few words to show the line wrapping, to see what happens when you have long lines.
- Second term
-
Explication of the second term with inline markup.
In many paragraphs.
| Header 1 | Header 2 |
|----------+----------|
| Value | not key |
Header 1 | Header 2 |
---|---|
Value | not key |
#+CAPTION: Description of the table
| Header 1 | Header 2 |
|----------+----------|
| Value | not key |
Header 1 | Header 2 |
---|---|
Value | not key |
Columns are automatically aligned:
- Number-rich columns to the right, and
- String-rich columns to the left.
If you want to override the automatic alignment, use <r>
, <c>
or <l>
.
#+CAPTION: Table with aligned columns
| <r> | <c> | <l> |
| 1 | 2 | 3 |
| Right | Center | Left |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
<r> | <c> | <l> |
1 | 2 | 3 |
Right | Center | Left |
xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
See http://www.pirilampo.org (automatic!) and the Org mode Web site.
How about some @apa ?
Sometimes you just need to quote someone.
this is a quote from someone very wise
#include <stdio.h>
int main() { (ref:sc)
// printf() displays the string inside quotation
printf("Hello, World!");
return 0;
}
in line (sc) there is some code.
#include <stdio.h> int main() { // printf() displays the string inside quotation printf("Hello, World!"); return 0; }
If you want to run ditaa
in Emacs you will need to add it to org-babel
and set the path to the ditaa.jar
you will have to install.
(org-babel-do-load-languages 'org-babel-load-languages '((ditaa . t))) (setq org-ditaa-jar-path "/usr/share/ditaa/ditaa.jar")
You can then use your best ascii art skills to draw diagrams.
#+BEGIN_SRC ditaa :file images/architecture.png :exports results +---------+ /----------------\ |Lucene{s}| |Search +---+---------+ +----------------+ | H2 {s} | SWANK |Source Resolver | +---------+ | +----------------+ +-----+ : +--------------+ |Doc Server | +--------+ |Emacs|<--->| Project +----+----------------+ | JVM{io}| +-----+ | +---+----------+ | |Debug Manager +---+--------+ : | ^ : +----------------+ | +---+----+ | | |Analyzer +---+-----------+ | |File{io}| | | \----------------/ |scalac | | |Watchers| | | +-----------+ | +--------+ | | /----------\ |Refactoring| | ^ | +--+Formatting| +-----------+ | | | \----------/ +----|-=--------|-=------------------------------------ +-----+ | +------++ |Files+--+ |.ensime| +-----+ +-------+ #+END_SRC
Is converted to the following image.
See http://www.orgmode.org (automatic!) and the
[[http://orgmode.org/][Org mode Web site]].
See http://www.orgmode.org (automatic!) and the Org mode Web site.
[[./introduction.org][Inception!]]
In the chapter, References, below the heading is annotated with custom properties.
* References
:PROPERTIES:
:CUSTOM_ID: References
:END:
Then you can reference the heading using a link.
See chapter [[#References][References]].
See chapter References.
[[./images/test.jpg]]
\begin{cautionblock} The current version of pandoc seems to have an issue with identifying the images when the extension is uppercase or pdf. It is tracked in issue 5454 on github (jgm/pandoc#5454).
If you have issues loading images, please check that one. \end{cautionblock}
#+label: fig:naame
#+caption: caption
[[file:images/test.jpg]]
See figure [@fig:name].
See figure [@fig:name] .
Admonitions (contextual backgrounds) are statements taken out of the content’s flow and labeled with a title.
Common admonitions are:
note
warning
tip
caution
important
This is a useful note.
Be careful! Check that you have...
Try doing it this way...
Caution
Important
This can be achieved by using Awesomebox
\begin{noteblock}
Another way to create a box
\end{noteblock}
\begin{noteblock} Another way to create a box \end{noteblock}
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\).
The formula \(a^2 + b^2 = c^2\) has been discovered by Pythagoras.
Let \(a=sin(x) + cos(x)\). Then \(a^2 = 2sin(x)cos(x)\) because \(sin^2x + cos^2x = 1\).
The /Euler theorem/:
\[
\int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}}
\]
LaTeX allows to inline such ~\[...\]~ constructs (/quadratic formula/):
\[ \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a} \]
The Euler theorem:
\[ ∫_0^∞ e-x^2 dx = {{\sqrt{π}} \over {2}} \]
LaTeX allows to inline such \[...\]
constructs (quadratic formula):
\[ \frac{-b ± \sqrt{b^2 - 4 a c}}{2a} \]
If you want to include a list of references in your document, which you should if you are writing a serious paper, then use the following code to include it in this section.
#+ATTR_HTML: :id refs
The result will be:
some stuff afterwards.