Org mode syntax
135 |
136 | Quick reference card
137 |
138 | Table of Contents
140 |-
142 |
- Summary 143 |
- Reference card 144 |
- Document header 145 |
- Document settings
146 |
-
147 |
- Document description 148 |
- Section numbering 149 |
- Table of contents 150 |
- List of figures 151 |
- List of tables 152 |
- List of equations 153 |
155 | - Section titles (headings)
156 |
-
157 |
- Bigger heading (level 2) 158 |
- Numbered headings 159 |
161 | - Paragraphs
162 |
-
163 |
- Normal 164 |
- Line breaks 165 |
- Horizontal rules 166 |
- Text width 167 |
169 | - Formatting text
170 |
-
171 |
- Bold and italic 172 |
- Monospace, superscript and subscript 173 |
- Smart punctuation 174 |
176 | - Lists
177 |
-
178 |
- Unordered lists 179 |
- Checklists 180 |
- Ordered lists 181 |
- Definition lists 182 |
- Separating lists 183 |
185 | - Tables
186 |
-
187 |
- Simple table 188 |
- Column formatting 189 |
- Header row 190 |
- A very long table 191 |
- Table placement 192 |
- Align tables on the page 193 |
- Table size 194 |
- CSV 195 |
197 | - Links
198 |
-
199 |
- External links 200 |
- Internal links 201 |
- Extensions that define new hyperlinks targets 202 |
204 | - Images
205 |
-
206 |
- Inline picture 207 |
- Image alignment (using positioning) 208 |
- Image attributes and values 209 |
- Figures 210 |
212 | - Videos 213 |
- Admonitions
214 |
-
215 |
- Base admonitions 216 |
- Additional admonitions 217 |
- Todo admonition 218 |
220 | - Centered text 221 |
- Sidebar 222 |
- Example 223 |
- Prose excerpts
224 |
-
225 |
- Quote 226 |
- Verse 227 |
- Block quote with optional attribution line 228 |
- Block quotes with their own class attribute 229 |
- Non-breaking space 230 |
232 | - Comments 233 |
- Substitutions
234 |
-
235 |
- General replacements 236 |
- Styled references 237 |
- Special characters 238 |
240 | - Source code
241 |
-
242 |
- Inline code 243 |
- Code blocks (with syntax highlighting) 244 |
- Source mode 245 |
- Line break 246 |
- Line numbers 247 |
- Callouts 248 |
250 | - Math
251 |
-
252 |
- Inline math expressions 253 |
- Math expressions in display mode 254 |
- Equation numbers 255 |
257 | - Miscellaneous effects
258 |
-
259 |
- Include Org files 260 |
- Raw HTML 261 |
- Raw LaTeX 262 |
264 | - Footnotes 265 |
- Useful extensions
266 |
-
267 |
- Todo extension 268 |
- Bigblow extension 269 |
271 | - Graphs with Graphviz
272 |
-
273 |
- Undirected 274 |
- Directed 275 |
277 | - Graphs with R
278 |
-
279 |
- Example 280 |
282 | - Citations 283 |
- Appendix
284 |
-
285 |
- Index 286 |
- Bibliography 287 |
- Glossary 288 |
290 | - Contributing 291 | 296 | 297 |
- License 298 |
| Framework | 312 |Org mode 8 | 313 |
| Bug tracker | 317 |https://github.com/fniessen/refcard-org-mode/issues | 318 |
| Source | 322 |https://github.com/fniessen/refcard-org-mode | 323 |
Summary
329 |
346 | This is an Org mode document, using the .org extension (supported by GitHub).
347 |
350 | Org mode is an easy-to-write plain text formatting syntax for authoring notes, 351 | articles, LaTeX documents, books, Web pages, Beamer slide decks and much more! 352 |
353 | 354 |355 | This is a cheat sheet for Org mode 8 (because of some markup syntax changes 356 | since Org mode 7), using ReadTheOrg CSS. 357 |
358 | 359 |360 | Reading through all the documentation is highly recommended, but for the truly 361 | impatient, following are some quick steps to get started. 362 |
363 | 364 |Reference card
370 |Table of Contents
373 |-
375 |
- Summary 376 |
- Reference card 377 |
- Document header 378 |
- Document settings
379 |
-
380 |
- Document description 381 |
- Section numbering 382 |
- Table of contents 383 |
- List of figures 384 |
- List of tables 385 |
- List of equations 386 |
388 | - Section titles (headings)
389 |
-
390 |
- Bigger heading (level 2) 391 |
- Numbered headings 392 |
394 | - Paragraphs
395 |
-
396 |
- Normal 397 |
- Line breaks 398 |
- Horizontal rules 399 |
- Text width 400 |
402 | - Formatting text
403 |
-
404 |
- Bold and italic 405 |
- Monospace, superscript and subscript 406 |
- Smart punctuation 407 |
409 | - Lists
410 |
-
411 |
- Unordered lists 412 |
- Checklists 413 |
- Ordered lists 414 |
- Definition lists 415 |
- Separating lists 416 |
418 | - Tables
419 |
-
420 |
- Simple table 421 |
- Column formatting 422 |
- Header row 423 |
- A very long table 424 |
- Table placement 425 |
- Align tables on the page 426 |
- Table size 427 |
- CSV 428 |
430 | - Links
431 |
-
432 |
- External links 433 |
- Internal links 434 |
- Extensions that define new hyperlinks targets 435 |
437 | - Images
438 |
-
439 |
- Inline picture 440 |
- Image alignment (using positioning) 441 |
- Image attributes and values 442 |
- Figures 443 |
445 | - Videos 446 |
- Admonitions
447 |
-
448 |
- Base admonitions 449 |
- Additional admonitions 450 |
- Todo admonition 451 |
453 | - Centered text 454 |
- Sidebar 455 |
- Example 456 |
- Prose excerpts
457 |
-
458 |
- Quote 459 |
- Verse 460 |
- Block quote with optional attribution line 461 |
- Block quotes with their own class attribute 462 |
- Non-breaking space 463 |
465 | - Comments 466 |
- Substitutions
467 |
-
468 |
- General replacements 469 |
- Styled references 470 |
- Special characters 471 |
473 | - Source code
474 |
-
475 |
- Inline code 476 |
- Code blocks (with syntax highlighting) 477 |
- Source mode 478 |
- Line break 479 |
- Line numbers 480 |
- Callouts 481 |
483 | - Math
484 |
-
485 |
- Inline math expressions 486 |
- Math expressions in display mode 487 |
- Equation numbers 488 |
490 | - Miscellaneous effects
491 |
-
492 |
- Include Org files 493 |
- Raw HTML 494 |
- Raw LaTeX 495 |
497 | - Footnotes 498 |
- Useful extensions
499 |
-
500 |
- Todo extension 501 |
- Bigblow extension 502 |
504 | - Graphs with Graphviz
505 |
-
506 |
- Undirected 507 |
- Directed 508 |
510 | - Graphs with R
511 |
-
512 |
- Example 513 |
515 | - Citations 516 |
- Appendix
517 |
-
518 |
- Index 519 |
- Bibliography 520 |
- Glossary 521 |
523 | - Contributing 524 | 529 | 530 |
- License 531 |
Document header
539 |541 | Title and author line: 542 |
543 | 544 |#+TITLE: Org mode syntax examples 547 | #+AUTHOR: Fabrice Niessen 548 | 549 | My document provides... 550 |551 |
554 | It’s a good practice to also include an email line following the author line. 555 |
556 | 557 |#+EMAIL: john.doe@example.com 560 |561 |
Document settings
567 |Document description
570 | 574 | 575 | 576 |577 |
Section numbering
583 |
587 |
588 |
593 |
594 | Table of contents
600 |
602 | Set the toc attribute to activate an auto-generated table of contents (limited
603 | to its 2 first levels) at the top of document.
604 |
609 |
610 |
615 |
616 |
620 | The ALT_TITLE property allows to set an alternate title (shorter, for example)
621 | for a given headline in the table of contents and other running heads.
622 |
627 | To locally insert the TOC at some random place, use the #+TOC: headlines [n]
628 | feature; for example:
629 |
634 |
635 | List of figures
641 |
643 | #+TOC: figures is not implemented yet in the HMTL backend.
644 |
List of tables
650 |
652 | #+TOC: tables is already implemented in the HTML backend.
653 |
List of equations
659 |Section titles (headings)
664 |* Biggest heading (level 1)
668 |
669 | New chapter.
670 |
671 | ** Bigger heading (level 2) 676 | 677 | New section. 678 | 679 | *** Big heading (level 3) 680 | 681 | New sub-section. 682 | 683 | **** Heading (level 4) 684 | 685 | New sub-sub-section. 686 |687 |
Bigger heading (level 2)
691 |693 | New section. 694 |
695 |Big heading (level 3)
699 |701 | New sub-section. 702 |
703 |Heading (level 4)
707 |709 | New sub-sub-section. 710 |
711 |Numbered headings
718 |720 | You can create numbered headings up to a certain level by setting an option: 721 |
722 | 723 |
726 |
727 | Paragraphs
734 |Normal
737 |A single newline has no effect. 741 | This line is part of the same paragraph. 742 | 743 | But an empty line 744 | 745 | demarcates paragraphs. 746 |747 |
750 | A single newline has no effect. 751 | This line is part of the same paragraph. 752 |
753 | 754 |755 | But an empty line 756 |
757 | 758 |759 | demarcates paragraphs. 760 |
761 |Line breaks
766 |By entering two consecutive backslashes, \\ 770 | you can force to break lines 771 | without starting a new paragraph. 772 |773 |
776 | By entering two consecutive backslashes,
777 | you can force to break lines
778 | without starting a new paragraph.
779 |
Horizontal rules
785 |For an horizontal line, insert at least 5 dashes: this is some text above an 789 | horizontal rule 790 | ----- 791 | and some text below it. 792 |793 |
796 | For an horizontal line, insert at least 5 dashes: this is some text above an 797 | horizontal rule 798 |
799 |800 |
801 | and some text below it. 802 |
803 |Text width
808 |810 | One morning, when Gregor Samsa woke from troubled dreams, he found himself 811 | transformed in his bed into a horrible vermin. He lay on his armour-like back, 812 | and if he lifted his head a little he could see his brown belly, slightly domed 813 | and divided by arches into stiff sections. The bedding was hardly able to cover 814 | it and seemed ready to slide off any moment. His many legs, pitifully thin 815 | compared with the size of the rest of him, waved about helplessly as he looked. 816 |
817 |Formatting text
823 |825 | Text effects. 826 |
827 |Bold and italic
831 |Emphasize (italics), strongly (bold), and /very strongly/ (bold italics). 835 |836 |
839 | Emphasize (italics), strongly (bold), and very strongly (bold italics). 840 |
841 | 842 |843 | Markup elements can be nested: 844 |
845 | 846 |This is italic text which contains underlined text within it, whereas this is 849 | normal underlined text. 850 |851 |
854 | This is italic text which contains underlined text within it, whereas this is 855 | normal underlined text. 856 |
857 | 858 |859 | Markup can span across multiple lines, by default no more than 2: 860 |
861 | 862 |*This 865 | is not 866 | bold.* 867 |868 |
871 | *This 872 | is not 873 | bold.* 874 |
875 | 876 |877 | Org mode does not interpret a marker surrounded by alphanumeric characters as an 878 | emphasis marker. So, you can’t (easily) emphasize just part of a word: 879 |
880 | 881 |Not feas*ible*. 884 |885 |
888 | Not feas*ible*. 889 |
890 |Monospace, superscript and subscript
895 |897 | Other elements to use sparingly are: 898 |
899 | 900 |- monospaced typewriter font for inline code 903 | - monospaced typewriter font for verbatim text 904 | - deleted text (vs. inserted text) 905 | - text with super, such as 2 906 | - text with sub, such as HO 907 |908 |
-
911 |
- monospaced typewriter font for
inline code
912 | - monospaced typewriter font for
verbatim text
913 | deleted text(vs. inserted text)
914 | - text with superscript, such as 210 915 |
- text with subscript, such as H2O 916 |
Smart punctuation
922 |
924 | If the XXX option is specified, Org mode will produce typographically correct
925 | output, converting straight quotes to curly quotes, --- to em-dashes, -- to
926 | en-dashes, and ... to ellipses.
927 |
Lists
934 |936 | Org markup allows you to create bulleted or numbered lists. It allows any 937 | combination of the two list types. 938 |
939 |Unordered lists
943 |945 | Itemized lists are marked with bullets. Create them with a minus or a plus sign. 946 |
947 | 948 |949 | They are convenient to organize data, and make the document prettier, and easier 950 | to read. 951 |
952 | 953 |- Item with some lengthy text wrapping hopefully across several lines. We add 956 | a few words to really show the line wrapping. 957 | - Bullet. 958 | + Bullet. 959 | * Bullet. 960 |961 |
-
964 |
- Item with some lengthy text wrapping hopefully across several lines. We add 965 | a few words to really show the line wrapping. 966 |
- Bullet.
967 |
-
968 |
- Bullet.
969 |
-
970 |
- Bullet. 971 |
972 |
973 | - Bullet.
969 |
Checklists
979 |- [X] Checked. 983 | - [-] Half-checked. 984 | - [ ] Not checked. 985 | - Normal list item. 986 |987 |
-
990 |
- ☑ Checked. 991 |
- ☐ Half-checked. 992 |
- ☐ Not checked. 993 |
- Normal list item. 994 |
Ordered lists
1000 |1002 | Enumerated lists are marked with numbers or letters: 1003 |
1004 | 1005 |1. Arabic (decimal) numbered list item. We add a few words to show the line 1008 | wrapping. 1009 | A. Upper case alpha (letter) numbered list item. 1010 | a. Lower alpha. 1011 | b. Lower alpha. 1012 | B. Upper alpha. 1013 | 2. Number. 1014 |1015 |
-
1018 |
- Arabic (decimal) numbered list item. We add a few words to show the line
1019 | wrapping.
1020 |
-
1021 |
- Upper case alpha (letter) numbered list item.
1022 |
-
1023 |
- Lower alpha. 1024 |
- Lower alpha. 1025 |
1026 | - Upper alpha. 1027 |
1028 | - Upper case alpha (letter) numbered list item.
1022 |
- Number. 1029 |
1032 | You can have ordered lists with jumping numbers: 1033 |
1034 | 1035 |2. [@2] We start with point number 2. 1038 | 3. Automatically numbered item. 1039 |1040 |
-
1043 |
- We start with point number 2. 1044 |
- Automatically numbered item. 1045 |
Definition lists
1051 |1053 | Labeled, multi-line lists. 1054 |
1055 | 1056 |- First term to define :: 1059 | Definition of the first term. We add a few words to show the line wrapping, 1060 | to see what happens when you have long lines. 1061 | 1062 | - Second term :: 1063 | Explication of the second term with inline markup. 1064 | 1065 | In many paragraphs. 1066 |1067 |
-
1070 |
- First term to define
- Definition of the first term. We add a few words to show the line wrapping, 1071 | to see what happens when you have long lines. 1072 | 1073 |
- Second term
1074 | Explication of the second term with inline markup. 1075 |
1076 | 1077 |1078 | In many paragraphs. 1079 |
1080 |
Separating lists
1086 |1088 | Adjacent lists sometimes like to fuse. To force the start of a new list, offset 1089 | the two lists by an empty line comment: 1090 |
1091 | 1092 |- apples
1095 | - oranges
1096 | - bananas
1097 |
1098 | # Comment.
1099 |
1100 | - carrots
1101 | - tomatoes
1102 | - celery
1103 |
1104 | -
1107 |
- apples 1108 |
- oranges 1109 |
- bananas 1110 |
-
1113 |
- carrots 1114 |
- tomatoes 1115 |
- celery 1116 |
Tables
1123 |1125 | Tables are one of the most refined areas of the Org mode syntax. They are very easy 1126 | to create and to read. 1127 |
1128 |Simple table
1132 || Cell in column 1, row 1 | Cell in column 2, row 1 | 1136 | | Cell in column 1, row 2 | Cell in column 2, row 2 | 1137 |1138 |
| Cell in column 1, row 1 | 1151 |Cell in column 2, row 1 | 1152 |
| Cell in column 1, row 2 | 1156 |Cell in column 2, row 2 | 1157 |
1162 | Org tables have cells of at most one line long: there is no such thing as 1163 | a multi-line table cell in Org. 1164 |
1165 |Column formatting
1170 |1172 | Columns are automatically aligned: 1173 |
1174 | 1175 |-
1176 |
- Number-rich columns to the right, and 1177 |
- String-rich columns to the left. 1178 |
Table with aligned cells
1183 |
1185 | If you want to override the automatic alignment, use <r>, <c> or <l>.
1186 |
Table with aligned columns 1191 | | <r> | <c> | <l> | 1192 | | 1 | 2 | 3 | 1193 | | Right | Center | Left | 1194 | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 1195 |1196 |
| 1 | 1211 |2 | 1212 |3 | 1213 |
| Right | 1217 |Center | 1218 |Left | 1219 |
| xxxxxxxxxxxx | 1223 |xxxxxxxxxxxx | 1224 |xxxxxxxxxxxx | 1225 |
Table with column size adjusted
1233 |Header row
1238 |1240 | You can create tables with an header row (by using an horizontal line of dashes 1241 | to separate it from the rest of the table). 1242 |
1243 | 1244 |Table with an header row 1247 | | Name of column 1 | Name of column 2 | Name of column 3 | 1248 | |------------------+------------------+------------------| 1249 | | Top left | Top middle | | 1250 | | | | Right | 1251 | | Bottom left | Bottom middle | | 1252 |1253 |
| Name of column 1 | 1268 |Name of column 2 | 1269 |Name of column 3 | 1270 |
|---|---|---|
| Top left | 1275 |Top middle | 1276 |1277 | |
| 1281 | | 1282 | | Right | 1283 |
| Bottom left | 1287 |Bottom middle | 1288 |1289 | |
A very long table
1297 |1299 | To test “sticky table headers”… 1300 |
1301 | 1302 || Name of column 1 | 1315 |Name of column 2 | 1316 |Name of column 3 | 1317 |
|---|---|---|
| Top left | 1322 |Top middle | 1323 |1324 | |
| 2 | 1328 |1329 | | 1330 | |
| 3 | 1334 |1335 | | 1336 | |
| 4 | 1340 |1341 | | 1342 | |
| 5 | 1346 |1347 | | 1348 | |
| 6 | 1352 |1353 | | 1354 | |
| 7 | 1358 |1359 | | 1360 | |
| 8 | 1364 |1365 | | 1366 | |
| 9 | 1370 |1371 | | 1372 | |
| 10 | 1376 |1377 | | 1378 | |
| 11 | 1382 |1383 | | 1384 | |
| 12 | 1388 |1389 | | 1390 | |
| 13 | 1394 |1395 | | 1396 | |
| 14 | 1400 |1401 | | 1402 | |
| 15 | 1406 |1407 | | Right | 1408 |
| 16 | 1412 |1413 | | 1414 | |
| 17 | 1418 |1419 | | 1420 | |
| 18 | 1424 |1425 | | 1426 | |
| 19 | 1430 |1431 | | 1432 | |
| 20 | 1436 |1437 | | 1438 | |
| 21 | 1442 |1443 | | 1444 | |
| 22 | 1448 |1449 | | 1450 | |
| 23 | 1454 |1455 | | 1456 | |
| 24 | 1460 |1461 | | 1462 | |
| 25 | 1466 |1467 | | 1468 | |
| 26 | 1472 |1473 | | 1474 | |
| 27 | 1478 |1479 | | 1480 | |
| 28 | 1484 |1485 | | 1486 | |
| 29 | 1490 |1491 | | 1492 | |
| Bottom left | 1496 |Bottom middle | 1497 |1498 | |
Table placement
1506 | 1510 | | a | b | 1511 | | 1 | 2 | 1512 |1513 |
| a | 1526 |b | 1527 |
| 1 | 1531 |2 | 1532 |
1537 | XXX Different from the following: 1538 |
1539 | 1540 || a | b | 1543 | | 1 | 2 | 1544 |1545 |
| a | 1558 |b | 1559 |
| 1 | 1563 |2 | 1564 |
Align tables on the page
1572 |Left
1575 |1577 | Here is a table on the left side: 1578 |
1579 | 1580 | 1583 | 1584 | | a | b | c | 1585 | |---+---+---| 1586 | | 1 | 2 | 3 | 1587 | | 4 | 5 | 6 | 1588 | 1589 |1590 |
| a | 1605 |b | 1606 |c | 1607 |
|---|---|---|
| 1 | 1612 |2 | 1613 |3 | 1614 |
| 4 | 1618 |5 | 1619 |6 | 1620 |
1624 | The noindent just gets rid of the indentation of the first line of a paragraph
1625 | which in this case is the table. The hfill adds infinite stretch after the
1626 | table, so it pushes the table to the left.
1627 |
Center
1633 |1635 | Here is a centered table: 1636 |
1637 | 1638 || a | b | c | 1641 | |---+---+---| 1642 | | 1 | 2 | 3 | 1643 | | 4 | 5 | 6 | 1644 |1645 |
| a | 1660 |b | 1661 |c | 1662 |
|---|---|---|
| 1 | 1667 |2 | 1668 |3 | 1669 |
| 4 | 1673 |5 | 1674 |6 | 1675 |
Right
1683 |1685 | And here’s a table on the right side: 1686 |
1687 | 1688 | 1691 | 1692 | | a | b | c | 1693 | |---+---+---| 1694 | | 1 | 2 | 3 | 1695 | | 4 | 5 | 6 | 1696 |1697 |
| a | 1712 |b | 1713 |c | 1714 |
|---|---|---|
| 1 | 1719 |2 | 1720 |3 | 1721 |
| 4 | 1725 |5 | 1726 |6 | 1727 |
1732 | Here the hfill adds infinite stretch before the table, so it pushes the table
1733 | to the right.
1734 |
Table size
1741 | 1745 | | Cell in column 1, row 1 | Cell in column 2, row 1 | 1746 | | Cell in column 1, row 2 | Cell in column 2, row 2 | 1747 |1748 |
| Cell in column 1, row 1 | 1761 |Cell in column 2, row 1 | 1762 |
| Cell in column 1, row 2 | 1766 |Cell in column 2, row 2 | 1767 |
CSV
1775 |1777 | You can fill a table from a CSV file using R commands. 1778 |
1779 |Links
1785 |* Links 1789 | :PROPERTIES: 1790 | :CUSTOM_ID: links 1791 | :END: 1792 |1793 |
1796 | This document is available in plain text, HTML and PDF. 1797 |
1798 | 1799 |1800 | The links are delimited by double square brackets. 1801 |
1802 |External links
1806 |See http://www.pirilampo.org (automatic!) and the 1810 | Org mode Web site. 1811 |1812 |
1815 | See http://www.pirilampo.org/ (automatic!) and the 1816 | Org mode Web site. 1817 |
1818 |Relative links
1822 | 1833 |Email links
1837 |email John Doe
1841 |
1842 | 1845 | email John Doe 1846 |
1847 |Image links
1852 |1854 | To get image links, put a link to a file in the description. 1855 |
1856 | 1857 |Clicking on the image file:images/org-mode-unicorn.png
1860 | leads to the Org mode home page.
1861 |
1862 |
1865 | Clicking on the image
1866 | leads to the Org mode home page.
1867 |
Internal links
1874 |Inline anchors
1879 | 1894 |Internal cross references
1898 |1900 | Links generally point to an headline. 1901 |
1902 | 1903 |See chapter Links.
1906 |
1907 | 1910 | See chapter Links. 1911 |
1912 | 1913 |1914 | To add a link to a figure (e.g., “See Figure 1”), just do: 1915 |
1916 | 1917 | 1920 | caption 1921 | file:fig.png 1922 | 1923 | See figure fig. 1924 |1925 |
1930 |
Figure 1: caption
1932 |1935 | See figure 1. 1936 |
1937 | 1938 |1939 | You can also create a hypertext link to a document anchor in the current 1940 | document or in another document. 1941 |
1942 | 1943 |See: 1946 | - Location cross reference. 1947 | - Section Internal links 1948 |1949 |
1952 | See: 1953 |
1954 |-
1955 |
- Location cross reference. 1956 |
- Section Internal links 1957 |
Extensions that define new hyperlinks targets
1964 |Images
1969 |1971 | You can insert image files of different formats to a document: 1972 |
1973 | 1974 || 1987 | | HTML | 1988 ||
|---|---|---|
| gif | 1994 |yes | 1995 |1996 | |
| jpeg | 2000 |yes | 2001 |2002 | |
| png | 2006 |yes | 2007 |2008 | |
| bmp | 2012 |(depends on browser support) | 2013 |2014 | |
Inline picture
2021 |Org mode logo 2025 | file:images/org-mode-unicorn.png 2026 |2027 |
2032 |
Figure 2: Org mode logo
2034 |Click to see the Unicorn picture.
2039 |
2040 | 2043 | Click to see the Unicorn picture. 2044 |
2045 |Image alignment (using positioning)
2050 |2052 | Books usually align/float images on the right/left of the contents. 2053 |
2054 |Image is left aligned
2058 |Image is right aligned
2062 |Image is centered
2066 |2068 | test.pdf 2069 |
2070 |Image attributes and values
2076 |2078 | XXX Available HTML image tags include … 2079 |
2080 | 2081 || Attribute | 2092 |Value(s) | 2093 |
|---|---|
:alt |
2098 | Alternate text | 2099 |
:height |
2103 | 2104 | |
:width |
2108 | User defined size in pixels | 2109 |
:align |
2113 | 2114 | |
:border |
2118 | 2119 | |
:bordercolor |
2123 | 2124 | |
:hspace |
2128 | 2129 | |
:vspace |
2133 | 2134 | |
:title |
2138 | User defined text | 2139 |
2146 | file:images/org-mode-unicorn.png 2147 |2148 |
2153 |
2157 | Place images side by side: XXX 2158 |
2159 |Figures
2164 |2166 | To define images that will be treated as book illustrations (figures) and 2167 | automatically labeled and numbered, use XXX. 2168 |
2169 |Videos
2175 |2177 | Videos can’t be added directly. 2178 |
2179 | 2180 |2181 | Though, you can add an image with a link to the video like this: 2182 |
2183 | 2184 |file:../bigblow.png
2187 |
2188 | Admonitions
2200 |2202 | Admonitions (contextual backgrounds) are statements taken out of the content’s 2203 | flow and labeled with a title. 2204 |
2205 | 2206 |2207 | Common admonitions are: 2208 |
2209 | 2210 |-
2211 |
note
2212 | warning
2213 | tip
2214 | caution
2215 | important
2216 |
2219 | (Most themes style only note and warning specially.)
2220 |
Base admonitions
2225 |Note
2228 |2230 | A note box is displayed as follows: 2231 |
2232 | 2233 |#+begin_note 2236 | This is a useful note. 2237 | #+end_note 2238 |2239 |
2243 | This is a useful note. 2244 |
2245 | 2246 |Warning
2252 |2254 | A warning box is displayed as follows: 2255 |
2256 | 2257 |#+begin_warning 2260 | Be careful! Check that you have... 2261 | #+end_warning 2262 |2263 |
2267 | Be careful! Check that you have… 2268 |
2269 | 2270 |Tip
2276 |2278 | A tip box is displayed as follows: 2279 |
2280 | 2281 |#+begin_tip 2284 | Try doing it this way... 2285 | #+end_tip 2286 |2287 |
2291 | Try doing it this way… 2292 |
2293 | 2294 |Caution
2300 |#+begin_caution 2304 | Caution 2305 | #+end_caution 2306 |2307 |
2311 | Caution 2312 |
2313 | 2314 |Important
2320 |#+begin_important 2324 | Important 2325 | #+end_important 2326 |2327 |
2331 | Important 2332 |
2333 | 2334 |Additional admonitions
2341 |Attention
2344 |#+begin_attention 2348 | Attention 2349 | #+end_attention 2350 |2351 |
2355 | Attention 2356 |
2357 | 2358 |Hint
2364 |#+begin_hint 2368 | Hint 2369 | #+end_hint 2370 |2371 |
2375 | Hint 2376 |
2377 | 2378 |Error
2384 |#+begin_error 2388 | Error 2389 | #+end_error 2390 |2391 |
2395 | Error 2396 |
2397 | 2398 |Danger
2404 |#+begin_danger 2408 | Danger 2409 | #+end_danger 2410 |2411 |
2415 | Danger 2416 |
2417 | 2418 |Todo admonition
2446 |2448 | Simple box (“inline task”): 2449 |
2450 | 2451 |*************** TODO Do this task 2454 | Description of inline task. 2455 | *************** END 2456 |2457 |
2460 | * TODO Do this task 2461 | Description of inline task. 2462 |
2463 |2465 | nil
2469 |
2470 | Description of inline task. 2471 |
2472 |2474 | or: 2475 |
2476 | 2477 |*************** WAIT [#B] Do also this other task :phone: 2480 | *************** END 2481 |2482 |
2485 | * WAIT [#B] Do also this other task :phone: 2486 |
2487 |2489 | nil
2493 | Admonitiontodo 2494 |
2495 | 2496 |2499 | Alternatively to the inline tasks (for creating “TODO” annotations), if you want 2500 | such notes not to show up in the published version, drawers may also do the job, 2501 | e.g.: 2502 |
2503 | 2504 |2505 | … 2506 |
2507 | 2508 |
2509 | You can then control what drawers are exported with
2510 | org-export-with-drawers (or per document with d OPTIONS item).
2511 |
Centered text
2518 |#+begin_left 2522 | This text is \\ 2523 | aligned to the left! 2524 | #+end_left 2525 | 2526 | #+begin_center 2527 | This text is \\ 2528 | centered! 2529 | #+end_center 2530 | 2531 | #+begin_right 2532 | This text is \\ 2533 | aligned to the right! 2534 | #+end_right 2535 |2536 |
2540 | This text is
2541 | aligned to the left!
2542 |
2548 | This text is
2549 | centered!
2550 |
2555 | This text is
2556 | aligned to the right!
2557 |
Sidebar
2565 |Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 2569 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 2570 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 2571 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 2572 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 2573 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 2574 | 2575 | #+begin_sidebar 2576 | Org mode was first released by Carsten Dominik in 2004 as an outlining and 2577 | project planning tool. Further development turned it into a general tool that 2578 | can be used to author professional documents like LaTeX. 2579 | #+end_sidebar 2580 | 2581 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac 2582 | turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor 2583 | sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies 2584 | mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien 2585 | ullamcorper pharetra. Vestibulum erat wisi... 2586 | 2587 | Phasellus ut libero. Nulla in libero non enim tristique sollicitudin. Ut 2588 | tempor. Phasellus pellentesque augue eget ante. Mauris malesuada. Donec sit 2589 | amet diam sit amet dolor placerat blandit. Morbi enim purus, imperdiet in, 2590 | molestie sit amet, pellentesque eu, mauris. In vel erat vel ipsum bibendum 2591 | commodo. Curabitur accumsan. Nam sed metus. Etiam tristique bibendum justo. 2592 |2593 |
2596 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 2597 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 2598 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 2599 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 2600 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 2601 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 2602 |
2603 | 2604 | 2612 | 2613 |2614 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac 2615 | turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor 2616 | sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies 2617 | mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien 2618 | ullamcorper pharetra. Vestibulum erat wisi… 2619 |
2620 | 2621 |2622 | Phasellus ut libero. Nulla in libero non enim tristique sollicitudin. Ut 2623 | tempor. Phasellus pellentesque augue eget ante. Mauris malesuada. Donec sit 2624 | amet diam sit amet dolor placerat blandit. Morbi enim purus, imperdiet in, 2625 | molestie sit amet, pellentesque eu, mauris. In vel erat vel ipsum bibendum 2626 | commodo. Curabitur accumsan. Nam sed metus. Etiam tristique bibendum justo. 2627 |
2628 |Example
2633 |
2635 | You can have example blocks.
2636 |
: 10/17/97 9:04 <DIR> bin 2641 | : 10/16/97 14:11 <DIR> DOS 2642 | : 10/16/97 14:46 <DIR> TEMP 2643 | : 10/16/97 14:37 <DIR> WINNT 2644 | : 10/16/97 14:25 119 AUTOEXEC.BAT 2645 | : 2/13/94 6:21 54,619 COMMAND.COM 2646 |2647 |
2650 | 10/17/97 9:04 <DIR> bin 2651 | 10/16/97 14:11 <DIR> DOS 2652 | 10/16/97 14:46 <DIR> TEMP 2653 | 10/16/97 14:37 <DIR> WINNT 2654 | 10/16/97 14:25 119 AUTOEXEC.BAT 2655 | 2/13/94 6:21 54,619 COMMAND.COM 2656 |2657 | 2658 |
2659 | or 2660 |
2661 | 2662 |#+begin_example 2665 | 10/17/97 9:04 <DIR> bin 2666 | 10/16/97 14:11 <DIR> DOS 2667 | 10/16/97 14:46 <DIR> TEMP 2668 | 10/16/97 14:37 <DIR> WINNT 2669 | 10/16/97 14:25 119 AUTOEXEC.BAT 2670 | 2/13/94 6:21 54,619 COMMAND.COM 2671 | #+end_example 2672 |2673 |
2676 | 10/17/97 9:04 <DIR> bin 2677 | 10/16/97 14:11 <DIR> DOS 2678 | 10/16/97 14:46 <DIR> TEMP 2679 | 10/16/97 14:37 <DIR> WINNT 2680 | 10/16/97 14:25 119 AUTOEXEC.BAT 2681 | 2/13/94 6:21 54,619 COMMAND.COM 2682 |2683 |
Prose excerpts
2688 |Quote
2691 |
2693 | Use the quote block for content that doesn't require the preservation of line
2694 | breaks.
2695 |
#+begin_quote 2700 | Let us change our traditional attitude to the construction of programs: 2701 | Instead of imagining that our main task is to instruct a computer what to do, 2702 | let us concentrate rather on explaining to human beings what we want a 2703 | computer to do. 2704 | 2705 | The practitioner of literate programming can be regarded as an essayist, whose 2706 | main concern is with exposition and excellence of style. Such an author, with 2707 | thesaurus in hand, chooses the names of variables carefully and explains what 2708 | each variable means. He or she strives for a program that is comprehensible 2709 | because its concepts have been introduced in an order that is best for human 2710 | understanding, using a mixture of formal and informal methods that reinforce 2711 | each other. 2712 | 2713 | -- Donald Knuth 2714 | #+end_quote 2715 |2716 |
2719 |2740 | 2741 |2720 | Let us change our traditional attitude to the construction of programs: 2721 | Instead of imagining that our main task is to instruct a computer what to do, 2722 | let us concentrate rather on explaining to human beings what we want a 2723 | computer to do. 2724 |
2725 | 2726 |2727 | The practitioner of literate programming can be regarded as an essayist, whose 2728 | main concern is with exposition and excellence of style. Such an author, with 2729 | thesaurus in hand, chooses the names of variables carefully and explains what 2730 | each variable means. He or she strives for a program that is comprehensible 2731 | because its concepts have been introduced in an order that is best for human 2732 | understanding, using a mixture of formal and informal methods that reinforce 2733 | each other. 2734 |
2735 | 2736 |2737 | – Donald Knuth 2738 |
2739 |
2742 | A short one: 2743 |
2744 | 2745 |#+begin_quote 2748 | Everything should be made as simple as possible, 2749 | but not any simpler. -- Albert Einstein 2750 | #+end_quote 2751 |2752 |
2755 |2760 |2756 | Everything should be made as simple as possible, 2757 | but not any simpler. – Albert Einstein 2758 |
2759 |
Verse
2765 |
2767 | In a verse environment, there is an implicit line break at the end of each line,
2768 | and indentation is preserved:
2769 |
#+begin_verse 2774 | Everything should be made as simple as possible, 2775 | but not any simpler. -- Albert Einstein 2776 | #+end_verse 2777 |2778 |
2781 | Everything should be made as simple as possible,
2782 | but not any simpler. – Albert Einstein
2783 |
2786 | Typically used for quoting passages of an email message: 2787 |
2788 | 2789 |#+begin_verse 2792 | >> The meeting has been postponed to next Friday. 2793 | > 2794 | > Has the deadline for the report been moved too? 2795 | 2796 | Yes. And chekout http://www.doodle.com/ for rescheduling the meeting. 2797 | 2798 | In the text body, 2799 | indentation is 2800 | preserved. 2801 | #+end_verse 2802 |2803 |
2806 | >> The meeting has been postponed to next Friday.
2807 | >
2808 | > Has the deadline for the report been moved too?
2809 |
2810 | Yes. And chekout http://www.doodle.com/ for rescheduling the meeting.
2811 |
2812 | In the text body,
2813 | indentation is
2814 | preserved.
2815 |
Block quote with optional attribution line
2821 |2824 | epigraph 2825 |
2826 | 2827 |Block quotes with their own class attribute
2833 |2836 | highlights 2837 |
2838 | 2839 |2843 | pull-quote 2844 |
2845 | 2846 |2850 | Blockquote 2851 |
2852 | 2853 |Non-breaking space
2859 |
2861 | Insert the Unicode character 00A0 to add a non-breaking space.
2862 |
2865 | FIXME Or add/use an Org entity? Or use tilde? 2866 |
2867 |Comments
2873 |It's possible to add comments in the document.
2877 |
2878 | # This Org comment here won't be displayed.
2879 |
2880 | 2883 | It’s possible to add comments in the document. 2884 |
2885 | 2886 |
2888 | Org doesn’t support comments inside paragraphs since a comment ends
2889 | a paragraph. However, you can mimic inline comments with export snippets, e.g.,
2890 | @@comment:...@@.
2891 |
2897 | If you have tables (for example) that you want to ignore during export, one possibility
2898 | is to use comment blocks or :noexport: subtrees. Another possibility is to
2899 | use non-exported drawers (see #+OPTIONS: d:).
2900 |
2905 | If you want to ignore that part only during export, but still want to 2906 | use keep it active in the buffer, I suggest to use a drawer, with an 2907 | appropriate `org-export-with-drawers’ value, e.g., 2908 |
2909 | 2910 |
2913 |
2914 | Substitutions
2920 |General replacements
2923 | 2927 | 2928 | Insert longtext wherever required. 2929 |2930 |
2933 | Insert this very very long text wherever required. 2934 |
2935 |Styled references
2940 | 2944 | 2945 | color(blue, This text is colored in blue.) 2946 | 2947 | color(red, This other text is in red.) 2948 |2949 |
2952 | This text is colored in blue. 2953 |
2954 | 2955 |2956 | This other text is in red. 2957 |
2958 | 2959 |2960 | Find more macros on GitHub. 2961 |
2962 |Special characters
2967 |2969 | We also use substitutions to include some of the widely used Unicode characters 2970 | (like ©, converted from text characters to its typographically correct entity). 2971 |
2972 |Accents
2976 |-
2980 |
2981 | -
2984 |
- À Á 2985 |
Punctuation
2991 |- Dash: 2995 | - Marks: 2996 | - Quotations: 2997 | - Miscellaneous: 2998 |2999 |
-
3002 |
- Dash: – — 3003 |
- Marks: ¡ ¿ 3004 |
- Quotations: « » 3005 |
- Miscellaneous: ¶ ª 3006 |
Commercial symbols
3012 |- Property marks: 3016 | - Currency: 3017 |3018 |
-
3021 |
- Property marks: © ® 3022 |
- Currency: ¢ € ¥ £ 3023 |
Greek characters
3029 |The Greek letters and are used to denote angles. 3033 |3034 |
3037 | The Greek letters α, β, and γ are used to denote angles. 3038 |
3039 |Math characters
3044 |- Science: 3048 | - Arrows: 3049 | - Function names: 3050 | - Signs and symbols: 3051 |3052 |
-
3055 |
- Science: ± ÷ 3056 |
- Arrows: → → ← ↔ ⇒ ⇐ ⇔ 3057 |
- Function names: arccos cos 3058 |
- Signs and symbols: • * 3059 |
Misc
3065 |- Zero-width non-joiner: 3069 | # Smilies: \smiley \sad 3070 | - Suits: 3071 |3072 |
-
3075 |
- Zero-width non-joiner: 3076 |
-
3078 |
- Suits: ♣ ♠ 3079 |
3083 | You can insert a real “zero-width space” Unicode character by pressing
3084 | C-x 8 RET zero width space RET or C-x 8 RET 200b RET.
3085 |
Source code
3095 |Inline code
3098 |Reference code like variables or functions inline. 3102 |3103 |
3106 | Reference code like variables or functions inline.
3107 |
3110 | You can also evaluate code inline as follows: 1 + 1 is 1 + 1
3111 | 2.
3112 |
Code blocks (with syntax highlighting)
3118 |3120 | The source code blocks support syntax highlighting: 3121 |
3122 | 3123 |/* 3126 | * Application that displays a "Hello" message to the standard output. 3127 | */ 3128 | int main(int arc, char **argv) 3129 | { 3130 | printf("Hello, %s!\n", (argc>1) ? argv[1] : "World"); 3131 | return 0; 3132 | } 3133 |3134 |
(defvar hello "Hello") 3139 | 3140 | (defun hello (name &optional greeting) 3141 | (message "%s %s" (or greeting "Hello") name)) 3142 | 3143 | (setq tab-width 4) 3144 |3145 |
3149 | You need htmlize.el in your load-path, for the HTML export.
3150 |
Source mode
3158 |3160 | The following language strings are currently recognized: 3161 |
3162 | 3163 |3164 | Awk, C, R, Asymptote, Calc, Clojure, CSS, Ditaa, Dot, Emacs Lisp, Forth, Fortran, Gnuplot, Haskell, IO, J, Java, Javascript, LaTeX, Ledger, Lilypond, Lisp, Makefile, Maxima, Matlab, Mscgen, Ocaml, Octave, Org, Perl, Pico Lisp, PlantUML, Python, Ruby, Sass, Scala, Scheme, Screen, Shell Script, Shen, Sql, Sqlite, Stan, ebnf2ps. 3165 |
3166 |Line break
3171 |3173 | Code block with long lines: 3174 |
3175 | 3176 |testing testing testing testing testing testing testing testing testing testing 3179 | 0 1 2 3 4 5 6 7 8 9 3180 | 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 3181 |3182 |
3185 | For PDF (LaTeX), one solution is to surround the code block such as: 3186 |
3187 | 3188 |print("This block is in scriptsize") 3191 |3192 |
3195 | This block is in scriptsize 3196 |3197 |
Line numbers
3202 |
3204 | Both in example and in src snippets, you can add a -n switch to the end of the
3205 | begin line to get the lines numbered:
3206 |
1: (defun org-xor (a b) 3211 | 2: "Exclusive or." 3212 |3213 |
3216 | If you use a +n switch, the numbering from the previous numbered snippet will
3217 | be continued in the current one:
3218 |
3: (if a (not b) b)) 3223 |3224 |
Callouts
3230 |
3232 | In literal examples, Org will interpret strings like (ref:name) as labels, and
3233 | use them as targets for special hyperlinks like [[(name)]] (i.e., the reference
3234 | name enclosed in single parenthesis). In HTML, hovering the mouse over such
3235 | a link will remote-highlight the corresponding code line, which is kind of
3236 | cool.
3237 |
3240 | You can also add a -r switch which removes the labels from the source code.
3241 | With the -n switch, links to these references will be labeled by the line
3242 | numbers from the code listing, otherwise links will use the labels with no
3243 | parentheses. Here is an example:
3244 |
1: (save-excursion ; 3249 | 2: (goto-char (point-min))) ; 3250 |3251 |
3254 | In line 1, we remember the current position. Line 2 jumps to
3255 | point-min.
3256 |
Math
3263 |3265 | You can embed LaTeX math formatting in Org mode files. 3266 |
3267 |Inline math expressions
3271 |
3273 | For inline math expressions, use the parentheses notation \(...\):
3274 |
The formula has been discovered by Pythagoras. 3279 | 3280 | Let . Then because 3281 | . 3282 |3283 |
3286 | The formula \(a^2 + b^2 = c^2\) has been discovered by Pythagoras. 3287 |
3288 | 3289 |3290 | Let \(a=\sin(x) + \cos(x)\). Then \(a^2 = 2\sin(x)\cos(x)\) because \(\sin^2x + 3291 | \cos^2x = 1\). 3292 |
3293 | 3294 |
3296 | It’s not advised to use the $...$ construct (both for Org and for MathJax).
3297 |
3300 | Don’t forget that $ is also a valid currency symbol!
3301 |
Math expressions in display mode
3309 |
3311 | For mathematical expressions which you want to make stand out, centered on their
3312 | own lines, use \[...\]:
3313 |
The Euler theorem: 3318 | 3319 | 3320 | 3321 | 3322 | 3323 | LaTeX allows to inline such \[...\] constructs (quadratic formula): 3324 | 3325 |3326 |
3329 | The Euler theorem: 3330 |
3331 | 3332 |3333 | \[ 3334 | \int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}} 3335 | \] 3336 |
3337 | 3338 |
3339 | LaTeX allows to inline such \[...\] constructs (quadratic formula):
3340 | \[ \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a} \]
3341 |
3345 | Double dollar signs ($$) should not be used.
3346 |
3353 | 3354 | 3355 | 3356 | 3357 | 3358 |3359 |
3362 | \[ 3363 | \left( \int_{0}^{\infty} \frac{\sin x}{\sqrt x}\,\mathrm{d}x \ 3364 | right)^{2} - 3365 | \prod_{k=1}^{\infty} \frac{4k^{2}}{4k^{2}-1} + 3366 | \frac{\lambda}{2n}\sum_{k=1} ^{n} \theta_{k} ^{2} x^{n} = 0 3367 | \] 3368 |
3369 | 3370 |3371 | The equation may be wrong, but it’s a nice one! 3372 |
3373 |Equation numbers
3378 |
3380 | Differently from $...$ and \(...\), an equation environment produces a numbered
3381 | equation to which you can add a label and reference the equation by (label) name
3382 | in other parts of the text. This is not possibly with unnumbered math
3383 | environments ($$, …).
3384 |
The Pythagoras theorem: 3389 | 3390 | 3391 | 3392 | 3393 | 3394 | 3395 | See equation pythag. 3396 | 3397 | # The sinus theorem can be written as the equation: 3398 | # 3399 | # \begin{equation} 3400 | # \label{eqn:sinalpha} 3401 | # \frac{\sin\alpha}{a}=\frac{\sin\beta}{b} 3402 | # \end{equation} 3403 | # 3404 | # See equation eqn:sinalpha. 3405 |3406 |
3409 | The Pythagoras theorem: 3410 |
3411 | 3412 | \begin{equation} 3413 | a^2 + b^2 = c^2 3414 | \end{equation} 3415 | 3416 |3417 | See equation 1. 3418 |
3419 | 3420 |3421 | Only captioned equations are numbered. 3422 |
3423 | 3424 |3425 | Other alternatives: use 3426 |
3427 |-
3428 |
\begin{equation*}or
3429 | \begin{displaymath}(= the verbose form of the\[...\]construct).
3430 |
3433 | M-q does not fill those.
3434 |
Miscellaneous effects
3441 |Include Org files
3444 |
3446 | You can include another Org file and skip its title by using the :lines argument
3447 | to #+INCLUDE:
3448 |
3453 |
3454 | 3458 | File inclusion, through INCLUDE keywords, is an export-only feature. 3459 |
3460 | 3461 |Raw HTML
3467 |3469 | You can include raw HTML in your Org documents and it will get kept as HTML 3470 | when it’s exported. 3471 |
3472 | 3473 |3474 | Text can be preformatted (in a fixed-width font). 3475 |
3476 |3477 | It is especially useful for more advanced stuff like images or tables where you 3478 | need more control of the HTML options than Org mode actually gives you. 3479 |
3480 | 3481 |3482 | Similarly, you can incorporate JS or do anything else you can do in a Web page 3483 | (such as importing a CSS file). 3484 |
3485 |Native DIV blocks
3489 |3491 | You can create named classes (to get style control from your CSS) with: 3492 |
3493 | 3494 |3495 | #+begin_myclass 3496 | This text is wrapped in a myclass DIV... 3497 | #+end_myclass 3498 |3499 | 3500 |
3501 | You can also add interactive elements to the HTML such as interactive R plots. 3502 |
3503 | 3504 |3505 | Finally, you can include an HTML file verbatim (during export) with: 3506 |
3507 | 3508 |
3511 |
3512 | 3515 | Don’t edit the exported HTML file! 3516 |
3517 |Raw LaTeX
3523 |3525 | You can also use raw LaTeX. XXX 3526 |
3527 | 3528 |3529 | Text can be preformatted (in a fixed-width font). 3530 |
3531 |Footnotes
3537 |It is possible to define named footnotes[fn:myfootnote], or ones with automatic 3541 | anchors[fn:2]. 3542 |3543 |
3546 | It is possible to define named footnotes1, or ones with automatic 3547 | anchors2. 3548 | It is possible to define named footnotes1, or ones with automatic 3549 | anchors2. 3550 |
3551 |Useful extensions
3556 |Todo extension
3559 |Dates
3562 |3564 | Timestamps: and . 3565 |
3566 |TODO We need to achieve…
3571 |DONE [A] Buy GTD book online
3575 |-
3577 |
- State “TODO” -> “DONE” 3578 |
3581 | By default, DONE actions will be collapsed.
3582 |
3585 | Note that I should probably implement that default behavior only for ARCHIVE’d
3586 | items.
3587 |
TODO [A] Read GTD book
3593 |3595 | 3596 |
3597 | By default, all (active) entries will be expanded at page load, so that their 3598 | contents is visible. 3599 |
3600 | 3601 |3602 | That can be changed by adding such a line (into your Org document): 3603 |
3604 | 3605 |
3608 |
3609 | TODO [B] Apply GTD methodoloy
3615 |3617 |
3618 | This section will be collapsed when loading the page because the entry has the
3619 | value hsCollapsed for the property :HTML_CONTAINER_CLASS:.
3620 |
3623 | Powerful, no? 3624 |
3625 |Some note computer write
3630 |3632 | You can add tags to any entry, and hightlight all entries having some specific 3633 | tag by clicking on the buttons made accessible to you in the “Dashboard”. 3634 |
3635 |Weekly review computer
3640 |
3642 | Now, you can even make your weekly review in the HTML export… Press the r key
3643 | to start entering the “review mode” where all but one active entry are
3644 | collapsed, so that you can really focus on one item at a time!
3645 |
Bigblow extension
3652 |
3654 | The string fixme (in upper case) gets replaced by a “Fix Me!” image:
3655 |
FIXME Delete this...
3660 |
3661 | 3664 | FIXME Delete this… 3665 |
3666 |Graphs with Graphviz
3672 |
3674 | To enable the Graphviz extension, we have to add it to the extensions list in
3675 | the org-babel-load-languages variable.
3676 |
(add-to-list 'org-babel-load-languages '(dot . t)) 3681 | (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages) 3682 |3683 |
3686 | It uses directly the dot command to process DOT language.
3687 |
Undirected
3692 |#+begin_src dot :file images/graph.png :cmdline -Tpng 3696 | graph foo { 3697 | "bar" -- "baz"; 3698 | } 3699 | #+end_src 3700 |3701 |
graph foo { 3706 | "bar" -- "baz"; 3707 | } 3708 |3709 |
3714 |
Directed
3721 |digraph foo { 3725 | "bar" -> "baz"; 3726 | } 3727 |3728 |
3733 |
Graphs with R
3741 |3743 | The output from the execution of programs, scripts or commands can be inserted 3744 | in the document itself, allowing you to work in the reproducible research 3745 | mindset. 3746 |
3747 | 3748 |
3749 | To enable the Graphviz extension, we have to add it to the extensions list in
3750 | the org-babel-load-languages variable.
3751 |
(add-to-list 'org-babel-load-languages '(R . t)) ; Requires R and ess-mode. 3756 | (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages) 3757 |3758 |
3761 | It uses directly the R command to process R language.
3762 |
Example
3767 |3769 | Data to be charted: 3770 |
3771 | 3772 || Month | 3783 |Degrees | 3784 |
|---|---|
| 01 | 3789 |3.8 | 3790 |
| 02 | 3794 |4.1 | 3795 |
| 03 | 3799 |6.3 | 3800 |
| 04 | 3804 |9.0 | 3805 |
| 05 | 3809 |11.9 | 3810 |
| 06 | 3814 |15.1 | 3815 |
| 07 | 3819 |17.1 | 3820 |
| 08 | 3824 |17.4 | 3825 |
| 09 | 3829 |15.7 | 3830 |
| 10 | 3834 |11.8 | 3835 |
| 11 | 3839 |7.7 | 3840 |
| 12 | 3844 |4.8 | 3845 |
3850 | Code: 3851 |
3852 | 3853 |plot(data, type="b", bty="l", col=c("#ABD249"), las=1, lwd=4) 3856 | grid(nx=NULL, ny=NULL, col=c("#E8E8E8"), lwd=1) 3857 | legend("bottom", legend=c("Degrees"), col=c("#ABD249"), pch=c(19)) 3858 |3859 |
3862 | The resulting chart: 3863 |
3864 | 3865 | 3866 |
3868 |
Citations
3876 |3878 | Cross-referenced to bibliography. 3879 |
3880 |Appendix
3885 |3887 | Special sections. 3888 |
3889 |Index
3893 |3895 | Index (or list of acronyms). 3896 |
3897 | 3898 |-
3899 |
- Write index entries 3900 |
3903 | Note that multi-entry terms generate separate index entries. 3904 |
3905 | 3906 |-
3907 |
- Place the index at the desired location 3908 | 3909 |
- Produce the index by updating
org-latex-pdf-process
3910 |
Bibliography
3916 |3918 | The bibliography… 3919 |
3920 | 3921 |-
3922 |
- Eric Steven Raymond. The Art of Unix Programming. Addison-Wesley. ISBN 3923 | 0-13-142901-9. 3924 |
Glossary
3930 |3932 | Glossaries are optional. Glossaries entries are an example of definition lists. 3933 |
3934 | 3935 |-
3936 |
- A glossary term
- The corresponding (indented) definition. 3937 | 3938 |
- A second glossary term
- The corresponding (indented) definition. 3939 |
Contributing
3946 |Issues
3949 |3951 | Report issues and suggest features and improvements on the GitHub issue tracker. 3952 |
3953 |Patches
3958 |3960 | I love contributions! Patches under any form are always welcome! 3961 |
3962 |Donations
3967 |3969 | If you like the refcard-org-mode project, you can show your appreciation and 3970 | help support future development by making a donation through PayPal. 3971 |
3972 | 3973 |3974 | Regardless of the donations, refcard-org-mode will always be free both as in 3975 | beer and as in speech. 3976 |
3977 |License
3983 |3985 | Copyright (C) 2014-2016 Fabrice Niessen. 3986 |
3987 | 3988 |
3989 | Author: Fabrice Niessen
3990 | Keywords: org-mode refcard
3991 |
3994 | This program is free software; you can redistribute it and/or modify it under 3995 | the terms of the GNU General Public License as published by the Free Software 3996 | Foundation, either version 3 of the License, or (at your option) any later 3997 | version. 3998 |
3999 | 4000 |4001 | This program is distributed in the hope that it will be useful, but WITHOUT ANY 4002 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 4003 | A PARTICULAR PURPOSE. See the GNU General Public License for more details. 4004 |
4005 | 4006 |4007 | You should have received a copy of the GNU General Public License along with 4008 | this program. If not, see http://www.gnu.org/licenses/. 4009 |
4010 | 4011 | 4012 |
4017 |
4018 | Footnotes:
4022 |4025 | Extensively used in large documents. 4026 |
4029 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 4030 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 4031 | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 4032 | commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit 4033 | esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat 4034 | non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 4035 |
