Org mode syntax
59 |
60 | Quick reference card
61 |
62 | Table of Contents
64 |-
66 |
- Summary 67 |
- ADVERT: Elevate your Emacs skills in Paris, Utrecht, Leuven or Valencia! 68 |
- Reference card 69 |
- Document header 70 |
- Document settings
71 |
-
72 |
- Document description 73 |
- Section numbering 74 |
- Table of contents 75 |
- List of figures 76 |
- List of tables 77 |
- List of equations 78 |
80 | - Section titles (headings)
81 |
-
82 |
- Bigger heading (level 2) 83 |
- Numbered headings 84 |
86 | - Paragraphs
87 |
-
88 |
- Normal 89 |
- Line breaks 90 |
- Horizontal rules 91 |
- Text width 92 |
94 | - Formatting text
95 |
-
96 |
- Bold and italic 97 |
- Monospace, superscript and subscript 98 |
- Smart punctuation 99 |
101 | - Lists
102 |
-
103 |
- Unordered lists 104 |
- Checklists 105 |
- Ordered lists 106 |
- Definition lists 107 |
- Separating lists 108 |
110 | - Tables
111 |
-
112 |
- Simple table 113 |
- Column formatting 114 |
- Header row 115 |
- A very long table 116 |
- Table placement 117 |
- Align tables on the page 118 |
- Table size 119 |
- CSV 120 |
122 | - Links
123 |
-
124 |
- External links 125 |
- Internal links 126 |
- Extensions that define new hyperlinks targets 127 |
129 | - Images
130 |
-
131 |
- Inline picture 132 |
- Image alignment (using positioning) 133 |
- Image attributes and values 134 |
- Figures 135 |
137 | - Videos 138 |
- Admonitions
139 |
-
140 |
- Base admonitions 141 |
- Additional admonitions 142 |
- Todo admonition 143 |
145 | - Centered text 146 |
- Sidebar 147 |
- Example 148 |
- Prose excerpts
149 |
-
150 |
- Quote 151 |
- Verse 152 |
- Block quote with optional attribution line 153 |
- Block quotes with their own class attribute 154 |
- Non-breaking space 155 |
157 | - Comments 158 |
- Substitutions
159 |
-
160 |
- General replacements 161 |
- Styled references 162 |
- Special characters 163 |
165 | - Source code
166 |
-
167 |
- Inline code 168 |
- Code blocks (with syntax highlighting) 169 |
- Source mode 170 |
- Line break 171 |
- Line numbers 172 |
- Callouts 173 |
175 | - Math
176 |
-
177 |
- Inline math expressions 178 |
- Math expressions in display mode 179 |
- Equation numbers 180 |
182 | - Miscellaneous effects
183 |
-
184 |
- Include Org files 185 |
- Raw HTML 186 |
- Raw LaTeX 187 |
189 | - Footnotes 190 |
- Useful extensions
191 |
-
192 |
- Todo extension 193 |
- Bigblow extension 194 |
196 | - Graphs with Graphviz
197 |
-
198 |
- Undirected 199 |
- Directed 200 |
202 | - Graphs with R
203 |
-
204 |
- Example 205 |
207 | - Citations 208 |
- Appendix
209 |
-
210 |
- Index 211 |
- Bibliography 212 |
- Glossary 213 |
215 | - Contributing 216 | 221 | 222 |
- License 223 |
Framework | 237 |Org mode 9 | 238 |
Bug tracker | 242 |https://github.com/fniessen/refcard-org-mode/issues | 243 |
Source | 247 |https://github.com/fniessen/refcard-org-mode | 248 |
Summary
254 |256 | You will learn to: 257 |
258 | 259 |-
260 |
- write your docs in Org mode 261 |
- create tables 262 |
- create custom code blocks 263 |
- and much more! 264 |
267 | This is an Org mode document, using the .org
extension (supported by GitHub).
268 |
271 | Org mode is an easy-to-write plain text formatting syntax for authoring notes, 272 | articles, LaTeX documents, books, Web pages, Beamer slide decks and much more! 273 |
274 | 275 |276 | This is a cheat sheet for Org mode 8 (because of some markup syntax changes 277 | since Org mode 7), using ReadTheOrg CSS. 278 |
279 | 280 |281 | Reading through all the documentation is highly recommended, but for the truly 282 | impatient, following are some quick steps to get started. 283 |
284 |ADVERT: Elevate your Emacs skills in Paris, Utrecht, Leuven or Valencia!
289 |291 | Unlock the power of Emacs! Join my next exclusive “Emacs Boost” course! 292 |
293 | 294 |295 | Ready to supercharge your productivity and become an Emacs ninja? Look no 296 | further! 297 |
298 | 299 |300 | What you’ll learn: 301 |
302 |-
303 |
- Master Emacs from the basics to advanced tricks. 304 |
- Boost your editing efficiency and streamline your workflow. 305 |
- Customize Emacs to fit your unique needs. 306 |
- And much more! 307 |
310 | Audience: Open to anyone interested in Emacs, from beginners to advanced 311 | users. 312 |
313 | 314 |315 | Why choose my course? 316 |
317 |-
318 |
- Expert instructor with 25 years of Emacs experience. 319 |
- Hands-on exercises to reinforce your learning. 320 |
- Networking opportunities with like-minded Emacs enthusiasts. 321 |
- Personalized attention. 322 |
325 | Don’t miss this opportunity to take your Emacs skills to the next level!
326 |
329 | Visit https://emacsboost.com/en/ for more information, dates and locations, and 330 | to reserve your seat. 331 |
332 |Reference card
337 |Table of Contents
340 |-
342 |
- Summary 343 |
- ADVERT: Elevate your Emacs skills in Paris, Utrecht, Leuven or Valencia! 344 |
- Reference card 345 |
- Document header 346 |
- Document settings
347 |
-
348 |
- Document description 349 |
- Section numbering 350 |
- Table of contents 351 |
- List of figures 352 |
- List of tables 353 |
- List of equations 354 |
356 | - Section titles (headings)
357 |
-
358 |
- Bigger heading (level 2) 359 |
- Numbered headings 360 |
362 | - Paragraphs
363 |
-
364 |
- Normal 365 |
- Line breaks 366 |
- Horizontal rules 367 |
- Text width 368 |
370 | - Formatting text
371 |
-
372 |
- Bold and italic 373 |
- Monospace, superscript and subscript 374 |
- Smart punctuation 375 |
377 | - Lists
378 |
-
379 |
- Unordered lists 380 |
- Checklists 381 |
- Ordered lists 382 |
- Definition lists 383 |
- Separating lists 384 |
386 | - Tables
387 |
-
388 |
- Simple table 389 |
- Column formatting 390 |
- Header row 391 |
- A very long table 392 |
- Table placement 393 |
- Align tables on the page 394 |
- Table size 395 |
- CSV 396 |
398 | - Links
399 |
-
400 |
- External links 401 |
- Internal links 402 |
- Extensions that define new hyperlinks targets 403 |
405 | - Images
406 |
-
407 |
- Inline picture 408 |
- Image alignment (using positioning) 409 |
- Image attributes and values 410 |
- Figures 411 |
413 | - Videos 414 |
- Admonitions
415 |
-
416 |
- Base admonitions 417 |
- Additional admonitions 418 |
- Todo admonition 419 |
421 | - Centered text 422 |
- Sidebar 423 |
- Example 424 |
- Prose excerpts
425 |
-
426 |
- Quote 427 |
- Verse 428 |
- Block quote with optional attribution line 429 |
- Block quotes with their own class attribute 430 |
- Non-breaking space 431 |
433 | - Comments 434 |
- Substitutions
435 |
-
436 |
- General replacements 437 |
- Styled references 438 |
- Special characters 439 |
441 | - Source code
442 |
-
443 |
- Inline code 444 |
- Code blocks (with syntax highlighting) 445 |
- Source mode 446 |
- Line break 447 |
- Line numbers 448 |
- Callouts 449 |
451 | - Math
452 |
-
453 |
- Inline math expressions 454 |
- Math expressions in display mode 455 |
- Equation numbers 456 |
458 | - Miscellaneous effects
459 |
-
460 |
- Include Org files 461 |
- Raw HTML 462 |
- Raw LaTeX 463 |
465 | - Footnotes 466 |
- Useful extensions
467 |
-
468 |
- Todo extension 469 |
- Bigblow extension 470 |
472 | - Graphs with Graphviz
473 |
-
474 |
- Undirected 475 |
- Directed 476 |
478 | - Graphs with R
479 |
-
480 |
- Example 481 |
483 | - Citations 484 |
- Appendix
485 |
-
486 |
- Index 487 |
- Bibliography 488 |
- Glossary 489 |
491 | - Contributing 492 | 497 | 498 |
- License 499 |
Document header
507 |509 | Title and author line: 510 |
511 | 512 |#+TITLE: Org mode syntax examples 514 | #+AUTHOR: Fabrice Niessen 515 | 516 | My document provides... 517 |518 |
521 | It’s a good practice to also include an email line following the author line. 522 |
523 | 524 |#+EMAIL: john.doe@example.com 526 |527 |
Document settings
533 |Document description
537 |543 | 540 | 541 | 542 |
Section numbering
549 |
553 |
552 |
558 |
557 | Table of contents
564 |
566 | Set the toc
attribute to activate an auto-generated table of contents (limited
567 | to its 2 first levels) at the top of document.
568 |
573 |
572 |
578 |
577 |
582 | The ALT_TITLE
property allows to set an alternate title (shorter, for example)
583 | for a given headline in the table of contents and other running heads.
584 |
589 | To locally insert the TOC at some random place, use the #+TOC: headlines [n]
590 | feature; for example:
591 |
596 |
595 | List of figures
602 |
604 | #+TOC: figures
is not implemented yet in the HTML backend.
605 |
List of tables
611 |
613 | #+TOC: tables
is already implemented in the HTML backend.
614 |
List of equations
620 |Section titles (headings)
625 |* Biggest heading (level 1)
628 |
629 | New chapter.
630 |
631 | ** Bigger heading (level 2) 635 | 636 | New section. 637 | 638 | *** Big heading (level 3) 639 | 640 | New sub-section. 641 | 642 | **** Heading (level 4) 643 | 644 | New sub-sub-section. 645 |646 |
Bigger heading (level 2)
650 |652 | New section. 653 |
654 |Big heading (level 3)
658 |660 | New sub-section. 661 |
662 |Heading (level 4)
666 |668 | New sub-sub-section. 669 |
670 |Numbered headings
677 |679 | You can create numbered headings up to a certain level by setting an option: 680 |
681 | 682 |
685 |
684 | Paragraphs
692 |Normal
696 |A single newline has no effect. 699 | This line is part of the same paragraph. 700 | 701 | But an empty line 702 | 703 | demarcates paragraphs. 704 |705 |
708 | A single newline has no effect. 709 | This line is part of the same paragraph. 710 |
711 | 712 |713 | But an empty line 714 |
715 | 716 |717 | demarcates paragraphs. 718 |
719 |Line breaks
724 |By entering two consecutive backslashes, \\ 727 | you can force a line break 728 | without starting a new paragraph. 729 |730 |
733 | By entering two consecutive backslashes,
734 | you can force a line break
735 | without starting a new paragraph.
736 |
Horizontal rules
742 |For an horizontal line, insert at least 5 dashes: this is some text above an 745 | horizontal rule 746 | ----- 747 | and some text below it. 748 |749 |
752 | For an horizontal line, insert at least 5 dashes: this is some text above an 753 | horizontal rule 754 |
755 |756 |
757 | and some text below it. 758 |
759 |Text width
764 |766 | One morning, when Gregor Samsa woke from troubled dreams, he found himself 767 | transformed in his bed into a horrible vermin. He lay on his armour-like back, 768 | and if he lifted his head a little he could see his brown belly, slightly domed 769 | and divided by arches into stiff sections. The bedding was hardly able to cover 770 | it and seemed ready to slide off any moment. His many legs, pitifully thin 771 | compared with the size of the rest of him, waved about helplessly as he looked. 772 |
773 |Formatting text
779 |781 | Text effects. 782 |
783 |Bold and italic
787 |Emphasize (italics), strongly (bold), and /very strongly/ (bold italics). 790 |791 |
794 | Emphasize (italics), strongly (bold), and very strongly (bold italics). 795 |
796 | 797 |798 | Markup elements can be nested: 799 |
800 | 801 |This is italic text which contains underlined text within it, whereas this is 803 | normal underlined text. 804 |805 |
808 | This is italic text which contains underlined text within it, whereas this is 809 | normal underlined text. 810 |
811 | 812 |813 | Markup can span across multiple lines, by default no more than 2: 814 |
815 | 816 |*This 818 | is not 819 | bold.* 820 |821 |
824 | This 825 | is not 826 | bold. 827 |
828 | 829 |830 | Org mode does not interpret a marker surrounded by alphanumeric characters as an 831 | emphasis marker. So, you can’t (easily) emphasize just part of a word: 832 |
833 | 834 |Not feas*ible*. 836 |837 |
840 | Not feas*ible*. 841 |
842 |Monospace, superscript and subscript
847 |849 | Other elements to use sparingly are: 850 |
851 | 852 |- monospaced typewriter font for inline code 854 | - monospaced typewriter font for verbatim text 855 | - deleted text (vs. inserted text) 856 | - text with super , such as 2 857 | - text with sub , such as H O 858 |859 |
-
862 |
- monospaced typewriter font for
inline code
863 | - monospaced typewriter font for
verbatim text
864 | deleted text(vs. inserted text)
865 | - text with superscript, such as 210 866 |
- text with subscript, such as H2O 867 |
Smart punctuation
873 |
875 | If the XXX option is specified, Org mode will produce typographically correct
876 | output, converting straight quotes to curly quotes, ---
to em-dashes, --
to
877 | en-dashes, and ...
to ellipses.
878 |
Lists
885 |887 | Org markup allows you to create bulleted or numbered lists. It allows any 888 | combination of the two list types. 889 |
890 |Unordered lists
894 |896 | Itemized lists are marked with bullets. Create them with a minus or a plus sign. 897 |
898 | 899 |900 | They are convenient to organize data, and make the document prettier, and easier 901 | to read. 902 |
903 | 904 |- Item with some lengthy text wrapping hopefully across several lines. We add 906 | a few words to really show the line wrapping. 907 | - Bullet. 908 | + Bullet. 909 | * Bullet. 910 |911 |
-
914 |
- Item with some lengthy text wrapping hopefully across several lines. We add 915 | a few words to really show the line wrapping. 916 |
- Bullet.
917 |
-
918 |
- Bullet.
919 |
-
920 |
- Bullet. 921 |
922 |
923 | - Bullet.
919 |
Checklists
929 |- [X] Checked. 932 | - [-] Half-checked. 933 | - [ ] Not checked. 934 | - Normal list item. 935 |936 |
-
939 |
- ☑ Checked. 940 |
- ☐ Half-checked. 941 |
- ☐ Not checked. 942 |
- Normal list item. 943 |
Ordered lists
949 |951 | Enumerated lists are marked with numbers or letters: 952 |
953 | 954 |1. Arabic (decimal) numbered list item. We add a few words to show the line 956 | wrapping. 957 | A. Upper case alpha (letter) numbered list item. 958 | a. Lower alpha. 959 | b. Lower alpha. 960 | B. Upper alpha. 961 | 2. Number. 962 |963 |
-
966 |
- Arabic (decimal) numbered list item. We add a few words to show the line
967 | wrapping.
968 |
-
969 |
- Upper case alpha (letter) numbered list item.
970 |
-
971 |
- Lower alpha. 972 |
- Lower alpha. 973 |
974 | - Upper alpha. 975 |
976 | - Upper case alpha (letter) numbered list item.
970 |
- Number. 977 |
980 | You can have ordered lists with jumping numbers: 981 |
982 | 983 |2. [@2] We start with point number 2. 985 | 3. Automatically numbered item. 986 |987 |
-
990 |
- We start with point number 2. 991 |
- Automatically numbered item. 992 |
Definition lists
998 |1000 | Labeled, multi-line lists. 1001 |
1002 | 1003 |- First term to define :: 1005 | Definition of the first term. We add a few words to show the line wrapping, 1006 | to see what happens when you have long lines. 1007 | 1008 | - Second term :: 1009 | Explication of the second term with inline markup. 1010 | 1011 | In many paragraphs. 1012 |1013 |
-
1016 |
- First term to define
- Definition of the first term. We add a few words to show the line wrapping, 1017 | to see what happens when you have long lines. 1018 | 1019 |
- Second term
1020 | Explication of the second term with inline markup. 1021 |
1022 | 1023 |1024 | In many paragraphs. 1025 |
1026 |
Separating lists
1032 |1034 | Adjacent lists sometimes like to fuse. To force the start of a new list, offset 1035 | the two lists by an empty line comment: 1036 |
1037 | 1038 |- apples
1040 | - oranges
1041 | - bananas
1042 |
1043 | # Comment.
1044 |
1045 | - carrots
1046 | - tomatoes
1047 | - celery
1048 |
1049 | -
1052 |
- apples 1053 |
- oranges 1054 |
- bananas 1055 |
-
1058 |
- carrots 1059 |
- tomatoes 1060 |
- celery 1061 |
Tables
1068 |1070 | Tables are one of the most refined areas of the Org mode syntax. They are very easy 1071 | to create and to read. 1072 |
1073 |Simple table
1077 || Cell in column 1, row 1 | Cell in column 2, row 1 | 1080 | | Cell in column 1, row 2 | Cell in column 2, row 2 | 1081 |1082 |
Cell in column 1, row 1 | 1095 |Cell in column 2, row 1 | 1096 |
Cell in column 1, row 2 | 1100 |Cell in column 2, row 2 | 1101 |
1106 | Org tables have cells of at most one line long: there is no such thing as 1107 | a multi-line table cell in Org. 1108 |
1109 |Column formatting
1114 |1116 | Columns are automatically aligned: 1117 |
1118 | 1119 |-
1120 |
- Number-rich columns to the right, and 1121 |
- String-rich columns to the left. 1122 |
Table with aligned cells
1127 |
1129 | If you want to override the automatic alignment, use <r>
, <c>
or <l>
.
1130 |
Table with aligned columns 1134 | | <r> | <c> | <l> | 1135 | | 1 | 2 | 3 | 1136 | | Right | Center | Left | 1137 | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 1138 |1139 |
1 | 1154 |2 | 1155 |3 | 1156 |
Right | 1160 |Center | 1161 |Left | 1162 |
xxxxxxxxxxxx | 1166 |xxxxxxxxxxxx | 1167 |xxxxxxxxxxxx | 1168 |
Table with column size adjusted
1176 |Header row
1181 |1183 | You can create tables with an header row (by using an horizontal line of dashes 1184 | to separate it from the rest of the table). 1185 |
1186 | 1187 |Table with an header row 1189 | | Name of column 1 | Name of column 2 | Name of column 3 | 1190 | |------------------+------------------+------------------| 1191 | | Top left | Top middle | | 1192 | | | | Right | 1193 | | Bottom left | Bottom middle | | 1194 |1195 |
Name of column 1 | 1210 |Name of column 2 | 1211 |Name of column 3 | 1212 |
---|---|---|
Top left | 1217 |Top middle | 1218 |1219 | |
1223 | | 1224 | | Right | 1225 |
Bottom left | 1229 |Bottom middle | 1230 |1231 | |
A very long table
1239 |1241 | To test “sticky table headers”… 1242 |
1243 | 1244 |Name of column 1 | 1257 |Name of column 2 | 1258 |Name of column 3 | 1259 |
---|---|---|
Top left | 1264 |Top middle | 1265 |1266 | |
2 | 1270 |1271 | | 1272 | |
3 | 1276 |1277 | | 1278 | |
4 | 1282 |1283 | | 1284 | |
5 | 1288 |1289 | | 1290 | |
6 | 1294 |1295 | | 1296 | |
7 | 1300 |1301 | | 1302 | |
8 | 1306 |1307 | | 1308 | |
9 | 1312 |1313 | | 1314 | |
10 | 1318 |1319 | | 1320 | |
11 | 1324 |1325 | | 1326 | |
12 | 1330 |1331 | | 1332 | |
13 | 1336 |1337 | | 1338 | |
14 | 1342 |1343 | | 1344 | |
15 | 1348 |1349 | | Right | 1350 |
16 | 1354 |1355 | | 1356 | |
17 | 1360 |1361 | | 1362 | |
18 | 1366 |1367 | | 1368 | |
19 | 1372 |1373 | | 1374 | |
20 | 1378 |1379 | | 1380 | |
21 | 1384 |1385 | | 1386 | |
22 | 1390 |1391 | | 1392 | |
23 | 1396 |1397 | | 1398 | |
24 | 1402 |1403 | | 1404 | |
25 | 1408 |1409 | | 1410 | |
26 | 1414 |1415 | | 1416 | |
27 | 1420 |1421 | | 1422 | |
28 | 1426 |1427 | | 1428 | |
29 | 1432 |1433 | | 1434 | |
Bottom left | 1438 |Bottom middle | 1439 |1440 | |
Table placement
1448 || a | b | 1452 | | 1 | 2 | 1453 |1454 | 1451 |
a | 1467 |b | 1468 |
1 | 1472 |2 | 1473 |
1478 | XXX Different from the following: 1479 |
1480 | 1481 || a | b | 1483 | | 1 | 2 | 1484 |1485 |
a | 1498 |b | 1499 |
1 | 1503 |2 | 1504 |
Align tables on the page
1512 |Left
1516 |1518 | Here is a table on the left side: 1519 |
1520 | 1521 || a | b | c | 1525 | |---+---+---| 1526 | | 1 | 2 | 3 | 1527 | | 4 | 5 | 6 | 1528 | 1529 |1530 | 1523 | 1524 |
a | 1545 |b | 1546 |c | 1547 |
---|---|---|
1 | 1552 |2 | 1553 |3 | 1554 |
4 | 1558 |5 | 1559 |6 | 1560 |
1564 | The noindent
just gets rid of the indentation of the first line of a paragraph
1565 | which in this case is the table. The hfill
adds infinite stretch after the
1566 | table, so it pushes the table to the left.
1567 |
Center
1573 |1575 | Here is a centered table: 1576 |
1577 | 1578 || a | b | c | 1580 | |---+---+---| 1581 | | 1 | 2 | 3 | 1582 | | 4 | 5 | 6 | 1583 |1584 |
a | 1599 |b | 1600 |c | 1601 |
---|---|---|
1 | 1606 |2 | 1607 |3 | 1608 |
4 | 1612 |5 | 1613 |6 | 1614 |
Right
1622 |1624 | And here’s a table on the right side: 1625 |
1626 | 1627 || a | b | c | 1631 | |---+---+---| 1632 | | 1 | 2 | 3 | 1633 | | 4 | 5 | 6 | 1634 |1635 | 1629 | 1630 |
a | 1650 |b | 1651 |c | 1652 |
---|---|---|
1 | 1657 |2 | 1658 |3 | 1659 |
4 | 1663 |5 | 1664 |6 | 1665 |
1670 | Here the hfill
adds infinite stretch before the table, so it pushes the table
1671 | to the right.
1672 |
Table size
1679 || Cell in column 1, row 1 | Cell in column 2, row 1 | 1683 | | Cell in column 1, row 2 | Cell in column 2, row 2 | 1684 |1685 | 1682 |
Cell in column 1, row 1 | 1698 |Cell in column 2, row 1 | 1699 |
Cell in column 1, row 2 | 1703 |Cell in column 2, row 2 | 1704 |
CSV
1712 |1714 | You can fill a table from a CSV file using R commands. 1715 |
1716 |Links
1722 |* Links 1725 | :PROPERTIES: 1726 | :CUSTOM_ID: links 1727 | :END: 1728 |1729 |
1732 | This document is available in plain text, HTML and PDF. 1733 |
1734 | 1735 |1736 | The links are delimited by double square brackets. 1737 |
1738 |External links
1742 |See http://www.pirilampo.org (automatic!) and the 1745 | Org mode Web site. 1746 |1747 |
1750 | See http://www.pirilampo.org (automatic!) and the 1751 | Org mode Web site. 1752 |
1753 |Relative links
1757 | 1767 |Email links
1771 |email John Doe
1774 |
1775 | 1778 | email John Doe 1779 |
1780 |Image links
1785 |1787 | To get image links, put a link to a file in the description. 1788 |
1789 | 1790 |Clicking on the image file:images/org-mode-unicorn.png
1792 | leads to the Org mode home page.
1793 |
1794 |
1797 | Clicking on the image
1798 | leads to the Org mode home page.
1799 |
Internal links
1806 |Inline anchors
1811 | 1825 |Internal cross references
1829 |1831 | Links generally point to an headline. 1832 |
1833 | 1834 |See chapter Links.
1836 |
1837 | 1840 | See chapter Links. 1841 |
1842 | 1843 |1844 | To add a link to a figure (e.g., “See Figure 1”), just do: 1845 |
1846 | 1847 |caption 1850 | file:fig.png 1851 | 1852 | See figure fig. 1853 |1854 | 1849 |
1859 |
Figure 1: caption
1861 |1864 | See figure 1. 1865 |
1866 | 1867 |1868 | You can also create a hypertext link to a document anchor in the current 1869 | document or in another document. 1870 |
1871 | 1872 |See: 1874 | - Location cross reference. 1875 | - Section Internal links 1876 |1877 |
1880 | See: 1881 |
1882 |-
1883 |
- Location cross reference. 1884 |
- Section Internal links 1885 |
Extensions that define new hyperlinks targets
1892 |Images
1897 |1899 | You can insert image files of different formats to a document: 1900 |
1901 | 1902 |1915 | | HTML | 1916 ||
---|---|---|
gif | 1922 |yes | 1923 |1924 | |
jpeg | 1928 |yes | 1929 |1930 | |
png | 1934 |yes | 1935 |1936 | |
bmp | 1940 |(depends on browser support) | 1941 |1942 | |
Inline picture
1949 |Org mode logo 1952 | file:images/org-mode-unicorn.png 1953 |1954 |
1959 |
Figure 2: Org mode logo
1961 |Click to see the Unicorn picture.
1965 |
1966 | 1969 | Click to see the Unicorn picture. 1970 |
1971 |Image alignment (using positioning)
1976 |1978 | Books usually align/float images on the right/left of the contents. 1979 |
1980 |Image is left aligned
1984 |Image is right aligned
1988 |Image is centered
1992 |Image attributes and values
1999 |2001 | XXX Available HTML image tags include … 2002 |
2003 | 2004 |Attribute | 2015 |Value(s) | 2016 |
---|---|
:alt |
2021 | Alternate text | 2022 |
:height |
2026 | 2027 | |
:width |
2031 | User defined size in pixels | 2032 |
:align |
2036 | 2037 | |
:border |
2041 | 2042 | |
:bordercolor |
2046 | 2047 | |
:hspace |
2051 | 2052 | |
:vspace |
2056 | 2057 | |
:title |
2061 | User defined text | 2062 |
file:images/org-mode-unicorn.png 2069 |2070 | 2068 |
2075 |
2079 | Place images side by side: XXX 2080 |
2081 |Figures
2086 |2088 | To define images that will be treated as book illustrations (figures) and 2089 | automatically labeled and numbered, use XXX. 2090 |
2091 |Videos
2097 |2099 | Videos can’t be added directly. 2100 |
2101 | 2102 |2103 | Though, you can add an image with a link to the video like this: 2104 |
2105 | 2106 |file:../bigblow.png
2108 |
2109 | Admonitions
2121 |2123 | Admonitions (contextual backgrounds) are statements taken out of the content’s 2124 | flow and labeled with a title. 2125 |
2126 | 2127 |2128 | Common admonitions are: 2129 |
2130 | 2131 |-
2132 |
note
2133 | warning
2134 | tip
2135 | caution
2136 | important
2137 |
2140 | (Most themes style only note
and warning
specially.)
2141 |
Base admonitions
2146 |Note
2150 |2152 | A note box is displayed as follows: 2153 |
2154 | 2155 |#+begin_note 2157 | This is a useful note. 2158 | #+end_note 2159 |2160 |
2164 | This is a useful note. 2165 |
2166 | 2167 |Warning
2173 |2175 | A warning box is displayed as follows: 2176 |
2177 | 2178 |#+begin_warning 2180 | Be careful! Check that you have... 2181 | #+end_warning 2182 |2183 |
2187 | Be careful! Check that you have… 2188 |
2189 | 2190 |Tip
2196 |2198 | A tip box is displayed as follows: 2199 |
2200 | 2201 |#+begin_tip 2203 | Try doing it this way... 2204 | #+end_tip 2205 |2206 |
2210 | Try doing it this way… 2211 |
2212 | 2213 |Caution
2219 |#+begin_caution 2222 | Caution 2223 | #+end_caution 2224 |2225 |
2229 | Caution 2230 |
2231 | 2232 |Important
2238 |#+begin_important 2241 | Important 2242 | #+end_important 2243 |2244 |
2248 | Important 2249 |
2250 | 2251 |Additional admonitions
2258 |Attention
2262 |#+begin_attention 2265 | Attention 2266 | #+end_attention 2267 |2268 |
2272 | Attention 2273 |
2274 | 2275 |Hint
2281 |#+begin_hint 2284 | Hint 2285 | #+end_hint 2286 |2287 |
2291 | Hint 2292 |
2293 | 2294 |Error
2300 |#+begin_error 2303 | Error 2304 | #+end_error 2305 |2306 |
2310 | Error 2311 |
2312 | 2313 |Danger
2319 |#+begin_danger 2322 | Danger 2323 | #+end_danger 2324 |2325 |
2329 | Danger 2330 |
2331 | 2332 |Todo admonition
2359 |2361 | Simple box (“inline task”): 2362 |
2363 | 2364 |*************** TODO Do this task 2366 | Description of inline task. 2367 | *************** END 2368 |2369 |
2372 | * TODO Do this task 2373 | Description of inline task. 2374 |
2375 |2377 | nil
2381 |
2382 | Description of inline task. 2383 |
2384 |2386 | or: 2387 |
2388 | 2389 |*************** WAIT [#B] Do also this other task :phone: 2391 | *************** END 2392 |2393 |
2396 | * WAIT [#B] Do also this other task :phone: 2397 |
2398 |2400 | nil
2404 | Admonitiontodo 2405 |
2406 | 2407 |2410 | Alternatively to the inline tasks (for creating “TODO” annotations), if you want 2411 | such notes not to show up in the published version, drawers may also do the job, 2412 | e.g.: 2413 |
2414 | 2415 |2416 | … 2417 |
2418 | 2419 |
2420 | You can then control what drawers are exported with
2421 | org-export-with-drawers
(or per document with d OPTIONS item).
2422 |
Centered text
2429 |#+begin_left 2432 | This text is \\ 2433 | aligned to the left! 2434 | #+end_left 2435 | 2436 | #+begin_center 2437 | This text is \\ 2438 | centered! 2439 | #+end_center 2440 | 2441 | #+begin_right 2442 | This text is \\ 2443 | aligned to the right! 2444 | #+end_right 2445 |2446 |
2450 | This text is
2451 | aligned to the left!
2452 |
2458 | This text is
2459 | centered!
2460 |
2465 | This text is
2466 | aligned to the right!
2467 |
Sidebar
2475 |Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 2478 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 2479 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 2480 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 2481 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 2482 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 2483 | 2484 | #+begin_sidebar 2485 | Org mode was first released by Carsten Dominik in 2004 as an outlining and 2486 | project planning tool. Further development turned it into a general tool that 2487 | can be used to author professional documents like LaTeX. 2488 | #+end_sidebar 2489 | 2490 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac 2491 | turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor 2492 | sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies 2493 | mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien 2494 | ullamcorper pharetra. Vestibulum erat wisi... 2495 | 2496 | Phasellus ut libero. Nulla in libero non enim tristique sollicitudin. Ut 2497 | tempor. Phasellus pellentesque augue eget ante. Mauris malesuada. Donec sit 2498 | amet diam sit amet dolor placerat blandit. Morbi enim purus, imperdiet in, 2499 | molestie sit amet, pellentesque eu, mauris. In vel erat vel ipsum bibendum 2500 | commodo. Curabitur accumsan. Nam sed metus. Etiam tristique bibendum justo. 2501 |2502 |
2505 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 2506 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 2507 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 2508 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 2509 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 2510 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 2511 |
2512 | 2513 | 2521 | 2522 |2523 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac 2524 | turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor 2525 | sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies 2526 | mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien 2527 | ullamcorper pharetra. Vestibulum erat wisi… 2528 |
2529 | 2530 |2531 | Phasellus ut libero. Nulla in libero non enim tristique sollicitudin. Ut 2532 | tempor. Phasellus pellentesque augue eget ante. Mauris malesuada. Donec sit 2533 | amet diam sit amet dolor placerat blandit. Morbi enim purus, imperdiet in, 2534 | molestie sit amet, pellentesque eu, mauris. In vel erat vel ipsum bibendum 2535 | commodo. Curabitur accumsan. Nam sed metus. Etiam tristique bibendum justo. 2536 |
2537 |Example
2542 |
2544 | You can have example
blocks.
2545 |
: 10/17/97 9:04 <DIR> bin 2549 | : 10/16/97 14:11 <DIR> DOS 2550 | : 10/16/97 14:46 <DIR> TEMP 2551 | : 10/16/97 14:37 <DIR> WINNT 2552 | : 10/16/97 14:25 119 AUTOEXEC.BAT 2553 | : 2/13/94 6:21 54,619 COMMAND.COM 2554 |2555 |
2558 | 10/17/97 9:04 <DIR> bin 2559 | 10/16/97 14:11 <DIR> DOS 2560 | 10/16/97 14:46 <DIR> TEMP 2561 | 10/16/97 14:37 <DIR> WINNT 2562 | 10/16/97 14:25 119 AUTOEXEC.BAT 2563 | 2/13/94 6:21 54,619 COMMAND.COM 2564 |2565 | 2566 | 2567 |
2568 | or 2569 |
2570 | 2571 |#+begin_example 2573 | 10/17/97 9:04 <DIR> bin 2574 | 10/16/97 14:11 <DIR> DOS 2575 | 10/16/97 14:46 <DIR> TEMP 2576 | 10/16/97 14:37 <DIR> WINNT 2577 | 10/16/97 14:25 119 AUTOEXEC.BAT 2578 | 2/13/94 6:21 54,619 COMMAND.COM 2579 | #+end_example 2580 |2581 |
2584 | 10/17/97 9:04 <DIR> bin 2585 | 10/16/97 14:11 <DIR> DOS 2586 | 10/16/97 14:46 <DIR> TEMP 2587 | 10/16/97 14:37 <DIR> WINNT 2588 | 10/16/97 14:25 119 AUTOEXEC.BAT 2589 | 2/13/94 6:21 54,619 COMMAND.COM 2590 |2591 |
Prose excerpts
2596 |Quote
2600 |
2602 | Use the quote
block for content that doesn’t require the preservation of line
2603 | breaks.
2604 |
#+begin_quote 2608 | Let us change our traditional attitude to the construction of programs: 2609 | Instead of imagining that our main task is to instruct a computer what to do, 2610 | let us concentrate rather on explaining to human beings what we want a 2611 | computer to do. 2612 | 2613 | The practitioner of literate programming can be regarded as an essayist, whose 2614 | main concern is with exposition and excellence of style. Such an author, with 2615 | thesaurus in hand, chooses the names of variables carefully and explains what 2616 | each variable means. He or she strives for a program that is comprehensible 2617 | because its concepts have been introduced in an order that is best for human 2618 | understanding, using a mixture of formal and informal methods that reinforce 2619 | each other. 2620 | 2621 | -- Donald Knuth 2622 | #+end_quote 2623 |2624 |
2627 |2648 | 2649 |2628 | Let us change our traditional attitude to the construction of programs: 2629 | Instead of imagining that our main task is to instruct a computer what to do, 2630 | let us concentrate rather on explaining to human beings what we want a 2631 | computer to do. 2632 |
2633 | 2634 |2635 | The practitioner of literate programming can be regarded as an essayist, whose 2636 | main concern is with exposition and excellence of style. Such an author, with 2637 | thesaurus in hand, chooses the names of variables carefully and explains what 2638 | each variable means. He or she strives for a program that is comprehensible 2639 | because its concepts have been introduced in an order that is best for human 2640 | understanding, using a mixture of formal and informal methods that reinforce 2641 | each other. 2642 |
2643 | 2644 |2645 | – Donald Knuth 2646 |
2647 |
2650 | A short one: 2651 |
2652 | 2653 |#+begin_quote 2655 | Everything should be made as simple as possible, 2656 | but not any simpler. -- Albert Einstein 2657 | #+end_quote 2658 |2659 |
2662 |2667 |2663 | Everything should be made as simple as possible, 2664 | but not any simpler. – Albert Einstein 2665 |
2666 |
Verse
2672 |
2674 | In a verse
environment, there is an implicit line break at the end of each line,
2675 | and indentation is preserved:
2676 |
#+begin_verse 2680 | Everything should be made as simple as possible, 2681 | but not any simpler. -- Albert Einstein 2682 | #+end_verse 2683 |2684 |
2687 | Everything should be made as simple as possible,
2688 | but not any simpler. – Albert Einstein
2689 |
2692 | Typically used for quoting passages of an email message: 2693 |
2694 | 2695 |#+begin_verse 2697 | >> The meeting has been postponed to next Friday. 2698 | > 2699 | > Has the deadline for the report been moved too? 2700 | 2701 | Yes. And chekout http://www.doodle.com/ for rescheduling the meeting. 2702 | 2703 | In the text body, 2704 | indentation is 2705 | preserved. 2706 | #+end_verse 2707 |2708 |
2711 | >> The meeting has been postponed to next Friday.
2712 | >
2713 | > Has the deadline for the report been moved too?
2714 |
2715 | Yes. And chekout http://www.doodle.com/ for rescheduling the meeting.
2716 |
2717 | In the text body,
2718 | indentation is
2719 | preserved.
2720 |
Block quote with optional attribution line
2726 |2729 | epigraph 2730 |
2731 | 2732 |Block quotes with their own class attribute
2738 |2741 | highlights 2742 |
2743 | 2744 |2748 | pull-quote 2749 |
2750 | 2751 |2755 | Blockquote 2756 |
2757 | 2758 |Non-breaking space
2764 |
2766 | Insert the Unicode character 00A0
to add a non-breaking space.
2767 |
2770 | FIXME Or add/use an Org entity? Or use tilde? 2771 |
2772 |Comments
2778 |It's possible to add comments in the document.
2781 |
2782 | # This Org comment here won't be displayed.
2783 |
2784 | 2787 | It’s possible to add comments in the document. 2788 |
2789 | 2790 |
2792 | Org doesn’t support comments inside paragraphs since a comment ends
2793 | a paragraph. However, you can mimic inline comments with export snippets, e.g.,
2794 | @@comment:...@@
.
2795 |
2801 | If you have tables (for example) that you want to ignore during export, one possibility
2802 | is to use comment blocks or :noexport:
subtrees. Another possibility is to
2803 | use non-exported drawers (see #+OPTIONS: d:).
2804 |
2809 | If you want to ignore that part only during export, but still want to 2810 | use keep it active in the buffer, I suggest to use a drawer, with an 2811 | appropriate `org-export-with-drawers’ value, e.g., 2812 |
2813 | 2814 |
2817 |
2816 | Substitutions
2823 |General replacements
2827 |longtext wherever required. 2832 |2833 | 2830 | 2831 | Insert
2836 | Insert this very very long text wherever required. 2837 |
2838 |Styled references
2843 |color(blue, This text is colored in blue.) 2848 | 2849 | color(red, This other text is in red.) 2850 |2851 | 2846 | 2847 |
2854 | This text is colored in blue. 2855 |
2856 | 2857 |2858 | This other text is in red. 2859 |
2860 | 2861 |2862 | Find more macros on GitHub. 2863 |
2864 |Special characters
2869 |2871 | We also use substitutions to include some of the widely used Unicode characters 2872 | (like ©, converted from text characters to its typographically correct entity). 2873 |
2874 |Accents
2878 |-
2882 |
2881 | -
2885 |
- À Á 2886 |
Punctuation
2892 |- Dash:2899 | 2895 | - Marks: 2896 | - Quotations: 2897 | - Miscellaneous: 2898 |
-
2902 |
- Dash: – — 2903 |
- Marks: ¡ ¿ 2904 |
- Quotations: « » 2905 |
- Miscellaneous: ¶ ª 2906 |
Commercial symbols
2912 |- Property marks:2917 | 2915 | - Currency: 2916 |
-
2920 |
- Property marks: © ® 2921 |
- Currency: ¢ € ¥ £ 2922 |
Greek characters
2928 |The Greek letters2932 | and are used to denote angles. 2931 |
2935 | The Greek letters α, β, and γ are used to denote angles. 2936 |
2937 |Math characters
2942 |- Science:2949 | 2945 | - Arrows: 2946 | - Function names: 2947 | - Signs and symbols: 2948 |
-
2952 |
- Science: ± ÷ 2953 |
- Arrows: → → ← ↔ ⇒ ⇐ ⇔ 2954 |
- Function names: arccos cos 2955 |
- Signs and symbols: • * 2956 |
Misc
2962 |- Zero-width non-joiner: # Smilies: \smiley \sad 2966 | - Suits: 2967 |2968 | 2965 |
-
2971 |
- Zero-width non-joiner: 2972 |
-
2975 |
- Suits: ♣ ♠ 2976 |
2980 | You can insert a real “zero-width space” Unicode character by pressing
2981 | C-x 8 RET zero width space RET
or C-x 8 RET 200b RET
.
2982 |
Source code
2992 |Inline code
2996 |Reference code like variables or functions inline. 2999 |3000 |
3003 | Reference code like variables
or functions
inline.
3004 |
3007 | You can also evaluate code inline as follows: 1 + 1 is 1 + 1
2
.
3008 |
Code blocks (with syntax highlighting)
3014 |3016 | The source code blocks support syntax highlighting: 3017 |
3018 | 3019 |/* 3021 | * Application that displays a "Hello" message to the standard output. 3022 | */ 3023 | int main(int arc, char **argv) 3024 | { 3025 | printf("Hello, %s!\n", (argc>1) ? argv[1] : "World"); 3026 | return 0; 3027 | } 3028 |3029 |
(defvar hello "Hello") 3033 | 3034 | (defun hello (name &optional greeting) 3035 | (message "%s %s" (or greeting "Hello") name)) 3036 | 3037 | (setq tab-width 4) 3038 |3039 |
3043 | You need htmlize.el
in your load-path
, for the HTML export.
3044 |
Source mode
3052 |3054 | The following language strings are currently recognized: 3055 |
3056 | 3057 |3058 | Awk, C, D, C++, and cpp, R, Calc, Clojure and ClojureScript, CSS, Ditaa, Dot, Emacs Lisp, Eshell, Forth, Fortran, GnuPlot, Groovy, Haskell, Java, JavaScript, Julia, LaTeX, LilyPond, Lisp, Lua, Makefile, Maxima, OCaml, Octave and MatLab, Org, Perl, Processing, PlantUML, Python, Ruby, Sass, Scheme, Screen, Sed, Shell Script, Sql, Sqlite. 3059 |
3060 |Line break
3065 |3067 | Code block with long lines: 3068 |
3069 | 3070 |testing testing testing testing testing testing testing testing testing testing 3072 | 0 1 2 3 4 5 6 7 8 9 3073 | 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 3074 |3075 |
3078 | For PDF (LaTeX), one solution is to surround the code block such as: 3079 |
3080 | 3081 |print("This block is in scriptsize")
3083 |
3084 | 3087 | This block is in scriptsize 3088 |3089 |
Line numbers
3094 |
3096 | Both in example
and in src
snippets, you can add a -n
switch to the end of the
3097 | begin
line to get the lines numbered:
3098 |
1: (defun org-xor (a b) 3102 | 2: "Exclusive or." 3103 |3104 |
3107 | If you use a +n
switch, the numbering from the previous numbered snippet will
3108 | be continued in the current one:
3109 |
3: (if a (not b) b)) 3113 |3114 |
Callouts
3120 |
3122 | In literal examples, Org will interpret strings like (ref:name)
as labels, and
3123 | use them as targets for special hyperlinks like [[(name)]]
(i.e., the reference
3124 | name enclosed in single parenthesis). In HTML, hovering the mouse over such
3125 | a link will remote-highlight the corresponding code line, which is kind of
3126 | cool.
3127 |
3130 | You can also add a -r
switch which removes the labels from the source code.
3131 | With the -n
switch, links to these references will be labeled by the line
3132 | numbers from the code listing, otherwise links will use the labels with no
3133 | parentheses. Here is an example:
3134 |
1: (save-excursion ; 3138 | 2: (goto-char (point-min))) ; 3139 |3140 |
3143 | In line 1, we remember the current position. Line 2 jumps to
3144 | point-min
.
3145 |
Math
3152 |3154 | You can embed LaTeX math formatting in Org mode files. 3155 |
3156 |Inline math expressions
3160 |
3162 | For inline math expressions, use the parentheses notation \(...\)
:
3163 |
The formula3171 | has been discovered by Pythagoras. 3167 | 3168 | Let . Then because 3169 | . 3170 |
3174 | The formula \(a^2 + b^2 = c^2\) has been discovered by Pythagoras. 3175 |
3176 | 3177 |3178 | Let \(a=\sin(x) + \cos(x)\). Then \(a^2 = 2\sin(x)\cos(x)\) because \(\sin^2x + 3179 | \cos^2x = 1\). 3180 |
3181 | 3182 |
3184 | It’s not advised to use the $...$
construct (both for Org and for MathJax).
3185 |
3188 | Don’t forget that $
is also a valid currency symbol!
3189 |
Math expressions in display mode
3197 |
3199 | For mathematical expressions which you want to make stand out, centered on their
3200 | own lines, use \[...\]
:
3201 |
The Euler theorem: 3205 | 3206 | 3207 | 3208 | 3209 | 3210 | LaTeX allows to inline such \[...\] constructs (quadratic formula): 3211 | 3212 |3213 |
3216 | The Euler theorem: 3217 |
3218 | 3219 |3220 | \[ 3221 | \int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}} 3222 | \] 3223 |
3224 | 3225 |
3226 | LaTeX allows to inline such \[...\]
constructs (quadratic formula):
3227 | \[ \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a} \]
3228 |
3232 | Double dollar signs ($$
) should not be used.
3233 |
3245 | 3239 | 3240 | 3241 | 3242 | 3243 | 3244 |
3248 | \[ 3249 | \left( \int_{0}^{\infty} \frac{\sin x}{\sqrt x}\,\mathrm{d}x \ 3250 | right)^{2} - 3251 | \prod_{k=1}^{\infty} \frac{4k^{2}}{4k^{2}-1} + 3252 | \frac{\lambda}{2n}\sum_{k=1} ^{n} \theta_{k} ^{2} x^{n} = 0 3253 | \] 3254 |
3255 | 3256 |3257 | The equation may be wrong, but it’s a nice one! 3258 |
3259 |Equation numbers
3264 |
3266 | Differently from $...$
and \(...\)
, an equation environment produces a numbered
3267 | equation to which you can add a label and reference the equation by (label) name
3268 | in other parts of the text. This is not possibly with unnumbered math
3269 | environments ($$
, …).
3270 |
The Pythagoras theorem: 3274 | 3275 | 3276 | 3277 | 3278 | 3279 | 3280 | See equation pythag. 3281 | 3282 | # The /sinus theorem/ can be written as the equation: 3283 | # 3284 | # \begin{equation} 3285 | # \label{eqn:sinalpha} 3286 | # \frac{\sin\alpha}{a}=\frac{\sin\beta}{b} 3287 | # \end{equation} 3288 | # 3289 | # See equation eqn:sinalpha. 3290 |3291 |
3294 | The Pythagoras theorem: 3295 |
3296 | 3297 | \begin{equation} 3298 | \label{orgf69bb91} 3299 | a^2 + b^2 = c^2 3300 | \end{equation} 3301 | 3302 |3303 | See equation \eqref{orgf69bb91}. 3304 |
3305 | 3306 |3307 | Only captioned equations are numbered. 3308 |
3309 | 3310 |3311 | Other alternatives: use 3312 |
3313 |-
3314 |
\begin{equation*}
or
3315 | \begin{displaymath}
(= the verbose form of the\[...\]
construct).
3316 |
3319 | M-q
does not fill those.
3320 |
Miscellaneous effects
3327 |Include Org files
3331 |
3333 | You can include another Org file and skip its title by using the :lines
argument
3334 | to #+INCLUDE
:
3335 |
3340 |
3339 | 3344 | File inclusion, through INCLUDE keywords, is an export-only feature. 3345 |
3346 | 3347 |Raw HTML
3353 |3355 | You can include raw HTML in your Org documents and it will get kept as HTML 3356 | when it’s exported. 3357 |
3358 | 3359 |3360 | Text can be preformatted (in a fixed-width font). 3361 |
3362 |3363 | It is especially useful for more advanced stuff like images or tables where you 3364 | need more control of the HTML options than Org mode actually gives you. 3365 |
3366 | 3367 |3368 | Similarly, you can incorporate JS or do anything else you can do in a Web page 3369 | (such as importing a CSS file). 3370 |
3371 |Native DIV blocks
3375 |3377 | You can create named classes (to get style control from your CSS) with: 3378 |
3379 | 3380 |3381 | #+begin_myclass 3382 | This text is wrapped in a myclass DIV... 3383 | #+end_myclass 3384 |3385 | 3386 |
3387 | You can also add interactive elements to the HTML such as interactive R plots. 3388 |
3389 | 3390 |3391 | Finally, you can include an HTML file verbatim (during export) with: 3392 |
3393 | 3394 |
3397 |
3396 | 3400 | Don’t edit the exported HTML file! 3401 |
3402 |Raw LaTeX
3408 |3410 | You can also use raw LaTeX. XXX 3411 |
3412 | 3413 |3414 | Text can be preformatted (in a fixed-width font). 3415 |
3416 |Footnotes
3422 |It is possible to define named footnotes[fn:myfootnote], or ones with automatic 3425 | anchors[fn:2]. 3426 |3427 |
3430 | It is possible to define named footnotes1, or ones with automatic 3431 | anchors2. 3432 | It is possible to define named footnotes1, or ones with automatic 3433 | anchors2. 3434 |
3435 |Useful extensions
3440 |Todo extension
3444 |Dates
3448 |3450 | Timestamps:
3452 | and . 3451 |TODO We need to achieve…
3457 |DONE [A] Buy GTD book online
3461 |-
3463 |
- State “TODO” -> “DONE” 3464 |
3467 | By default, DONE
actions will be collapsed.
3468 |
3471 | Note that I should probably implement that default behavior only for ARCHIVE
’d
3472 | items.
3473 |
TODO [A] Read GTD book
3479 |3481 | 3482 |
3483 | By default, all (active) entries will be expanded at page load, so that their 3484 | contents is visible. 3485 |
3486 | 3487 |3488 | That can be changed by adding such a line (into your Org document): 3489 |
3490 | 3491 |
3494 |
3493 | TODO [B] Apply GTD methodoloy
3500 |3502 |
3503 | This section will be collapsed when loading the page because the entry has the
3504 | value hsCollapsed
for the property :HTML_CONTAINER_CLASS:
.
3505 |
3508 | Powerful, no? 3509 |
3510 |Some note computer write
3515 |3517 | You can add tags to any entry, and hightlight all entries having some specific 3518 | tag by clicking on the buttons made accessible to you in the “Dashboard”. 3519 |
3520 |Weekly review computer
3525 |
3527 | Now, you can even make your weekly review in the HTML export… Press the r
key
3528 | to start entering the “review mode” where all but one active entry are
3529 | collapsed, so that you can really focus on one item at a time!
3530 |
Bigblow extension
3537 |
3539 | The string fixme
(in upper case) gets replaced by a “Fix Me!” image:
3540 |
FIXME Delete this... 3544 |3545 |
3548 | FIXME Delete this… 3549 |
3550 |Graphs with Graphviz
3556 |
3558 | To enable the Graphviz extension, we have to add it to the extensions list in
3559 | the org-babel-load-languages
variable.
3560 |
(add-to-list 'org-babel-load-languages '(dot . t)) 3564 | (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages) 3565 |3566 |
3569 | It uses directly the dot
command to process DOT language.
3570 |
Undirected
3575 |#+begin_src dot :file images/graph.png :cmdline -Tpng 3578 | graph foo { 3579 | "bar" -- "baz"; 3580 | } 3581 | #+end_src 3582 |3583 |
graph foo { 3587 | "bar" -- "baz"; 3588 | } 3589 |3590 |
3595 |
Directed
3602 |digraph foo { 3605 | "bar" -> "baz"; 3606 | } 3607 |3608 |
3613 |
Graphs with R
3621 |3623 | The output from the execution of programs, scripts or commands can be inserted 3624 | in the document itself, allowing you to work in the reproducible research 3625 | mindset. 3626 |
3627 | 3628 |
3629 | To enable the Graphviz extension, we have to add it to the extensions list in
3630 | the org-babel-load-languages
variable.
3631 |
(add-to-list 'org-babel-load-languages '(R . t)) ; Requires R and ess-mode. 3635 | (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages) 3636 |3637 |
3640 | It uses directly the R
command to process R language.
3641 |
Example
3646 |3648 | Data to be charted: 3649 |
3650 | 3651 |Month | 3662 |Degrees | 3663 |
---|---|
01 | 3668 |3.8 | 3669 |
02 | 3673 |4.1 | 3674 |
03 | 3678 |6.3 | 3679 |
04 | 3683 |9.0 | 3684 |
05 | 3688 |11.9 | 3689 |
06 | 3693 |15.1 | 3694 |
07 | 3698 |17.1 | 3699 |
08 | 3703 |17.4 | 3704 |
09 | 3708 |15.7 | 3709 |
10 | 3713 |11.8 | 3714 |
11 | 3718 |7.7 | 3719 |
12 | 3723 |4.8 | 3724 |
3729 | Code: 3730 |
3731 | 3732 |plot(data, type="b", bty="l", col=c("#ABD249"), las=1, lwd=4) 3734 | grid(nx=NULL, ny=NULL, col=c("#E8E8E8"), lwd=1) 3735 | legend("bottom", legend=c("Degrees"), col=c("#ABD249"), pch=c(19)) 3736 |3737 |
3740 | The resulting chart: 3741 |
3742 |Citations
3748 |3750 | Cross-referenced to bibliography. 3751 |
3752 |Appendix
3757 |3759 | Special sections. 3760 |
3761 |Index
3765 |3767 | Index (or list of acronyms). 3768 |
3769 | 3770 |-
3771 |
- Write index entries 3772 |
3775 | Note that multi-entry terms generate separate index entries. 3776 |
3777 | 3778 |-
3779 |
- Place the index at the desired location 3780 | 3781 |
- Produce the index by updating
org-latex-pdf-process
3782 |
Bibliography
3788 |3790 | The bibliography… 3791 |
3792 | 3793 |-
3794 |
- Eric Steven Raymond. The Art of Unix Programming. Addison-Wesley. ISBN 3795 | 0-13-142901-9. 3796 |
Glossary
3802 |3804 | Glossaries are optional. Glossaries entries are an example of definition lists. 3805 |
3806 | 3807 |-
3808 |
- A glossary term
- The corresponding (indented) definition. 3809 | 3810 |
- A second glossary term
- The corresponding (indented) definition. 3811 |
Contributing
3818 |Issues
3822 |3824 | Report issues and suggest features and improvements on the GitHub issue tracker. 3825 |
3826 |Patches
3831 |3833 | I love contributions! Patches under any form are always welcome! 3834 |
3835 |Donations
3840 |3842 | If you use the refcard-org-mode project and feel it is making your life better 3843 | and easier, you can show your appreciation and help support future development 3844 | by making a donation through PayPal. Thank you! 3845 |
3846 | 3847 |3848 | Regardless of the donations, refcard-org-mode will always be free both as in 3849 | beer and as in speech. 3850 |
3851 |License
3857 |3859 | Copyright (C) 2014-2024 Fabrice Niessen. All rights reserved. 3860 |
3861 | 3862 |
3863 | Author: Fabrice Niessen
3864 | Keywords: org-mode refcard
3865 |
3868 | This program is free software; you can redistribute it and/or modify it under 3869 | the terms of the GNU General Public License as published by the Free Software 3870 | Foundation, either version 3 of the License, or (at your option) any later 3871 | version. 3872 |
3873 | 3874 |3875 | This program is distributed in the hope that it will be useful, but WITHOUT ANY 3876 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 3877 | A PARTICULAR PURPOSE. See the GNU General Public License for more details. 3878 |
3879 | 3880 |3881 | You should have received a copy of the GNU General Public License along with 3882 | this program. If not, see http://www.gnu.org/licenses/. 3883 |
3884 | 3885 | 3886 |
Footnotes:
3895 |3898 | Extensively used in large documents. 3899 |
3902 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 3903 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 3904 | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 3905 | commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit 3906 | esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat 3907 | non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 3908 |