org-mode for beginners (摘录自官方文档)
2 synopsis
org-mode : Your life in plain text. Org-mode is for keeping notes , maintaining TODO lists , planning projects, and authoring documents with a fast and effective plain-text system .
3 installation
org is part of recent distribution of GNU Emacs, so you normally don’t need to install it. look up this link if you need more infomation .installation
4 simple operation
4.1 title
The title of the exported document is taken from the special line
#+TITLE: this is the title of the document
4.2 font
- / italic /
- * Bold *
- +
strickout+ - _ underline _
- subscript : H_2 o
- superscript : E=mc^2
4.3 list
4.3.1 ORG KNOWS ORDERED LISTS,UNORDERED LISTS , AND DESCRIPTION LISTS.
- Unordered list items start with “-” ,”+” or “*” as bullets.
- Ordered list items start with a numeral followed by either a period or a right parenthesis ,such as ’1.’ or ’1)’.If you want a list to start with a different value (e.g.,20), start the text of the item with [@20].
- Description list items are unordered list items , and contain the separator ‘::’ to distinguish the description term from the description.
4.3.2 EXAMPLE FOR LIST
**** Lord of the Rings My favorite scenes are (in this order) 1. The attack of the Rohirrim 2. Eowyn's fight with the witch king + this was already my favorite scene in the book + I really like Miranda Otto. 3. Peter Jackson being shot by Legolas - on DVD only He makes a really funny face when it happens. ORG-LIST-END-MARKER But in the end, no individual scenes matter but the film as a whole. Important actors in this film are: - Elijah Wood :: He plays Frodo - Sean Austin :: He plays Sam, Frodo's friend. I still remember him very well from his role as Mikey Walsh in The Goonies. ORG-LIST-END-MARKER
** Lord of the Rings My favorite scenes are (in this order)
- The attack of the Rohirrim
- Eowyn’s fight with the witch king
- this was already my favorite scene in the book
- I really like Miranda Otto.
- Peter Jackson being shot by Legolas
- on DVD only
He makes a really funny face when it happens.
ORG-LIST-END-MARKER But in the end, no individual scenes matter but the film as a whole. Important actors in this film are:
-
Elijah Wood
- He plays Frodo Sean Austin
- He plays Sam, Frodo’s friend. I still remember him very well from his role as Mikey Walsh in The Goonies.
ORG-LIST-END-MARKER
4.4 TODO shortcut key
4.5 Metadata embeded important
4.5.1 ORG-MODE METADATA LIST:
s #+begin_src ... #+end_src e #+begin_example ... #+end_example : 单行的例子以冒号开头 q #+begin_quote ... #+end_quote 通常用于引用,与默认格式相比左右都会留出缩进 v #+begin_verse ... #+end_verse 默认内容不换行,需要留出空行才能换行 c #+begin_center ... #+end_center l #+begin_latex ... #+end_latex L #+latex: h #+begin_html ... #+end_html H #+html: a #+begin_ascii ... #+end_ascii A #+ascii: i #+index: line I #+include: line
- The first letter of each item of the above list is shortcut key . e.g., input “<s” and TAB .
- using the parameters for code block.
#+begin_src c -n -t -h 7 -w 40 #+end_src 其中: c : the added language. -n : show the line numbers -t : clean the format -h 7 set width 7 -w 40 set height 40
- comment
- start with “#”
#+BEGIN_COMMENT # block comment ... #+END_COMMENT
- table and image
e.g. | table |
name | basic-data |
cross | reference |
For Org mode tables, the lines before the first horizontal separator line will become table header lines. You can use the following lines somewhere before the table to assign a caption and a label for cross references, and in the text you can refer to the object with cross:
- include file
#+INCLUDE: "~/emacs" src emacs-lisp
- document metadata
- H ,
- num ,
- toc , (create table of contents)
- creator
- link up ; link home
4.6 Table (important)
4.6.1 C-C |
4.6.2 C-C , C-C
4.6.3 TAB & RET : MOVE TO NEXT REGION OR NEXT ROW
4.6.4 C-C – & C-C RET : ADD THE HORIZONTAL LINE
4.6.5 C-C ^ : SORT BY COLUMN
4.7 LINK
4.8 cut-off line
“-” more than five will been translated to horizontal cut-off line.
4.9 TAG