Introduction
This notes is on how to use org-mode to write things. Org provides with many functionalities and is highly customizable and extensible. Every writing feature encompasses some handy tricks listed like below:
KEYS PRESSED
(function called - optional): explanation on what it does
Basic Editing
Comments
- C-c ;
- toggle comment of an entry
|
|
Font types
|
|
will be rendered as:
- italic
- bold
- underlined
verbatim
code
strike through
Org Entities
for entering special characters, we can use org entities:
https://stackoverflow.com/questions/16443386/how-to-escape-double-quote/31207746#31207746
|
|
Headings
|
|
C-RET
: new headingM-RET
: new heading by spliting current headingC-S-RET
: new heading, but with TODOM-S-RET
: new heading by spliting current heading, but with TODOM-LEFT/RIGHT
: Promote/Demote current subtreeM-UP/DOWN
: Move/swap subtree up/down
Code
Offers two types of source code:
- code block
- inline code
org-entities-help function helps you insert some code.
inline
|
|
typedef long long ll;
echo -e "test"
code block
source code blocks are one of many Org block types.
|
|
|
|
List
- M-RET
- new item at current level
- M-S-RET
- new item with a checkbox
- M-UP/DOWN
- move item up/down, including subitems
- M-S-UP/DOWN
- move item up/down
- M-LEFT/RIGHT
- decrease/increase indentation of item
- M-S-LEFT/RIGHT
- decrease/increase indentation of item, including subitems
- C-c C-c
- toggle checkbox
- C-c -
- Cycle through itemize/enumerate bullets
Table
- |Name|Age C-c RET create table with headers
NAME Age sky 22 k4i 23 - RET go to next row
- S-UP/DOWN/LEFT/RIGHT swap between cells
- M-UP/DOWN/LEFT/RIGHT swap between rows/columns
- M-S-UP/DOWN/LEFT/RIGHT insert/delete row/column
- C-c - insert horizontal line below
- C-c RET insert horizontal line below, move to next row
- C-c ^ sort column
Footnote
for more information on footnote, please refer to the official org site1.
footnote types:
- named footnote
- fn:NAME
- anonymous, inline footnote
- fn:: inline definition, fn:NAME: inline definition
example
|
|
hyperlinks
- formats
[[link][description]]
[[link]]
- k4i’s home!
- link types
- internal links
- external links
- shortcuts
- C-c C-l: insert/delete link
- C-c C-o: open link
todos [1/2]
DONE subtask 01
- M-S-RET
- new todo item
- C-c C-t
- cycle through todo states
BUG subtask 02 [1/2]
- [-] item 01
- item 01.01
- item 01.02
- item 02
Images
- C-c C-x C-v
- toggle images (org-toggle-inline-images)
Exports
latex
latex config
|
|
add this in your front matter
|
|
fixed reference ids
Org will set random ids for internal links, sometimes we want them to be fixed.
There are two solutions, one is to seed the random number generater2.
|
|
And another way is to override the org-export-new-reference
3 function:
|
|