Org-mode syntax export test
- Headings
- First Level Heading
- Text Formatting
- Lists
- Tables
- Source Code Blocks
- Quotes and Verses
- Horizontal Rules
- Tags:tag:
- Heading with Single Tag:work:
- Heading with Multiple Tags:work:important:
- Heading with Inherited Tags:project:development:
- Properties and Drawers
- Mathematical Expressions (LaTeX)
- Special Symbols and Entities
- Macros
- Comments
- Special Blocks
- Org Babel Features
- Miscellaneous
- Conclusion
This document demonstrates the full range of Org mode syntax features.
Headings
Org mode supports multiple levels of headings using asterisks:
First Level Heading
Second Level Heading
Third Level Heading
Fourth Level Heading
Fifth Level Heading
- Sixth Level Heading
Text Formatting
Org mode offers several ways to format text:
Bold text is wrapped in asterisks.
Italic text uses forward slashes.
Underlined text uses underscores.
Strikethrough text uses plus signs.
Verbatim text (inline code) uses equal signs.
Code text uses tildes.
You can also combine them: bold and italic, underlined and italic, etc.
Lists
Unordered Lists
Simple bullet lists use hyphens, plus signs, or asterisks:
- First item
- Second item
- Third item
- Nested item 1
- Nested item 2
- Deeper nesting
- Fourth item
Ordered Lists
Numbered lists use numbers followed by periods or parentheses:
- First item
- Second item
- Third item
- Nested numbered item
- Another nested item
- Fourth item
Description Lists
Description lists pair terms with definitions:
- Term 1
- Definition of the first term
- Term 2
- Definition of the second term
- Longer Term
- A longer definition that can span multiple lines and continue here
Checklists
Tasks with checkboxes:
- Unchecked item
- [-] Partially completed (some children done)
- Completed item
- Subtask 1
- Subtask 2
Tables
Simple Table
| Name | Age | City |
|---|---|---|
| Alice | 30 | New York |
| Bob | 25 | San Francisco |
| Charlie | 35 | Boston |
Table with Formulas
| Item | Quantity | Price | Total |
|---|---|---|---|
| Apples | 5 | 0.50 | 2.50 |
| Oranges | 3 | 0.75 | 2.25 |
| Bananas | 10 | 0.30 | 3.00 |
| Total | 18 | 7.75 |
Table with Alignment
| Right | Center | Left |
|---|---|---|
| 1 | 2 | 3 |
| 100 | 200 | 300 |
Source Code Blocks
Inline Code
Use code or code for inline code snippets.
Code Blocks with Syntax Highlighting
def fibonacci(n):
"""Calculate the nth Fibonacci number."""
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
# Example usage
print(fibonacci(10))
(defun greet (name)
"Greet NAME with a friendly message."
(message "Hello, %s!" name))
(greet "World")
#include <iostream>
#include <vector>
int main() {
std::vector<int> numbers = {1, 2, 3, 4, 5};
for (const auto& num : numbers) {
std::cout << num << std::endl;
}
return 0;
}
Example Blocks
For pre-formatted text without syntax highlighting:
This is an example block.
It preserves spacing and formatting.
Indentation is maintained.
No syntax highlighting is applied.
Export/Verbatim Blocks
This HTML will be exported directly.
Quotes and Verses
Block Quotes
The best way to predict the future is to invent it. — Alan Kay
Verse Blocks
For poetry or formatted text where line breaks matter:
Roses are red,
Violets are blue,
Org mode is great,
And so are you.
Horizontal Rules
Separate sections with horizontal rules using five or more dashes:
Content after the rule.
Tags tag
Heading with Single Tag work
Heading with Multiple Tags workimportant
Heading with Inherited Tags projectdevelopment
Properties and Drawers
Heading with Properties
Heading with Logbook
Mathematical Expressions (LaTeX)
Inline Math
The quadratic formula is \(x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}\).
Einstein’s famous equation: \(E = mc^2\).
Display Math
\[ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} \]
\begin{equation} \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} \end{equation}
Special Symbols and Entities
Greek letters: α, β, γ, Δ, Ω
Arrows: →, ←, ⇒
Math: ×, ÷, ±, ≤, ≥, ≠
Other: ©, ®, ™
Macros
Welcome, Lander! This is version 1.0.
Comments
Special Blocks
Note Block
This is a custom note block that can be styled differently on export.
Warning Block
This is a warning to pay attention to something important.
Org Babel Features
Executable Code
for i in range(5):
print(f"Number: {i}")
Table Generation from Code
data = [
["Language", "Year"],
["Python", 1991],
["JavaScript", 1995],
["Go", 2009]
]
return data
Code with Variables
| x | y |
|---|---|
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
return sum([x + y for x, y in data])
Miscellaneous
Line Breaks
Force a line break with
This text appears on a new line.
Subscripts and Superscripts
Use underscores for subscripts: H_2O
Use carets for superscripts: E=mc^2
Special Strings
Org mode automatically converts certain strings:
- Three dots: …
- Arrows: -> and <-
- Dashes: en-dash – and em-dash —
Emphasis in Headlines
Headlines can contain bold, italic, and other formatting.
Conclusion
This document covers most of the common Org mode syntax features. Org mode is a powerful markup language with many more advanced features for task management, time tracking, literate programming, and publishing.
For more information, visit the official documentation at https://orgmode.org.