├── README.org └── README.html /README.org: -------------------------------------------------------------------------------- 1 | #+TITLE: Org mode syntax 2 | #+SUBTITLE: Quick reference card 3 | #+AUTHOR: Fabrice Niessen 4 | #+EMAIL: (concat "fniessen" at-sign "pirilampo.org") 5 | #+DESCRIPTION: Org mode syntax example 6 | #+KEYWORDS: org-mode, syntax, quick reference, cheat sheet, recommended practices, latex, beamer, html 7 | #+LANGUAGE: en 8 | #+OPTIONS: H:4 num:nil toc:2 p:t 9 | 10 | #+HTML_LINK_HOME: http://www.google.com 11 | #+HTML_LINK_UP: http://www.bing.com 12 | 13 | # #+SETUPFILE: ~/src/org-html-themes/setup/theme-readtheorg-local-abs.setup 14 | #+SETUPFILE: ~/src/org-html-themes/setup/theme-readtheorg.setup 15 | 16 | #+PROPERTY: header-args :eval yes :exports both :results replace 17 | 18 | # #+MACRO: longtext this is a very very long text to include 19 | 20 | | *Framework* | Org mode 8 | 21 | | *Bug tracker* | https://github.com/fniessen/refcard-org-mode/issues | 22 | | *Source* | https://github.com/fniessen/refcard-org-mode | 23 | # | *Documentation* | http://refcard-org-mode.readthedocs.org/ | 24 | 25 | * Summary 26 | 27 | # See https://tutorialtodoapp.readthedocs.org/en/latest/ for nice home page! 28 | 29 | #+begin_sidebar 30 | *You will learn to:* 31 | 32 | - write your docs in Org mode 33 | - create tables 34 | - create custom code blocks 35 | - and much more! 36 | #+end_sidebar 37 | 38 | #+begin_abstract 39 | This is an Org mode document, using the ~.org~ extension (supported by GitHub). 40 | 41 | *Org mode* is an easy-to-write /plain text/ formatting syntax for authoring notes, 42 | articles, LaTeX documents, books, Web pages, Beamer slide decks and much more! 43 | 44 | This is a cheat sheet for *Org mode 8* (because of some markup syntax changes 45 | since Org mode 7), using [[https://github.com/fniessen/org-html-themes][ReadTheOrg CSS]]. 46 | 47 | Reading through all the [[http://orgmode.org/org.pdf][documentation]] is highly recommended, but for the truly 48 | impatient, following are some quick steps to get started. 49 | #+end_abstract 50 | 51 | # #+begin_abstract 52 | # This paper talks about... 53 | # #+end_abstract 54 | 55 | # See http://asciidoctor.org/docs/user-manual/#the-big-picture 56 | 57 | # See http://home.fnal.gov/~neilsen/notebook/orgExamples/org-examples.html. 58 | 59 | * Reference card 60 | 61 | #+TOC: headlines 2 62 | 63 | * Document header 64 | 65 | Title and author line: 66 | 67 | #+begin_src org :eval never-export 68 | ,#+TITLE: Org mode syntax examples 69 | ,#+AUTHOR: Fabrice Niessen 70 | 71 | My document provides... 72 | #+end_src 73 | 74 | It's a good practice to also include an email line following the author line. 75 | 76 | #+begin_src org :eval never-export 77 | ,#+EMAIL: john.doe@example.com 78 | #+end_src 79 | 80 | * Document settings 81 | 82 | ** Document description 83 | 84 | #+begin_src org :eval never-export 85 | #+DESCRIPTION: This document catalogs a set of tips and tricks for composing documents in Org mode. 86 | #+KEYWORDS: org-mode, syntax, quick reference, cheat sheet, recommended practices, latex, beamer, html 87 | #+LANGUAGE: en 88 | #+end_src 89 | 90 | ** Section numbering 91 | 92 | #+begin_src org :eval never-export 93 | #+OPTIONS: H:4 94 | #+end_src 95 | 96 | #+begin_src org :eval never-export 97 | #+OPTIONS: num:nil 98 | #+end_src 99 | 100 | ** Table of contents 101 | 102 | Set the ~toc~ attribute to activate an auto-generated table of contents (limited 103 | to its 2 first levels) at the top of document. 104 | 105 | #+begin_src org :eval never-export 106 | #+OPTIONS: toc:2 107 | #+end_src 108 | 109 | #+begin_src org :eval never-export 110 | #+OPTIONS: p:t 111 | #+end_src 112 | 113 | #+begin_note 114 | The ~ALT_TITLE~ property allows to set an alternate title (shorter, for example) 115 | for a given headline in the table of contents and other running heads. 116 | #+end_note 117 | 118 | To locally insert the TOC at some random place, use the ~#+TOC: headlines [n]~ 119 | feature; for example: 120 | 121 | #+begin_src org :eval never-export 122 | ,#+TOC: headlines 2 123 | #+end_src 124 | 125 | ** List of figures 126 | 127 | ~#+TOC: figures~ is not implemented yet in the HMTL backend. 128 | 129 | ** List of tables 130 | 131 | ~#+TOC: tables~ is already implemented in the HTML backend. 132 | 133 | ** List of equations 134 | 135 | * Section titles (headings) 136 | 137 | #+begin_src org :eval no 138 | ,* Biggest heading (level 1) 139 | 140 | New chapter. 141 | #+end_src 142 | 143 | #+begin_src org 144 | ,** Bigger heading (level 2) 145 | 146 | New section. 147 | 148 | ,*** Big heading (level 3) 149 | 150 | New sub-section. 151 | 152 | ,**** Heading (level 4) 153 | 154 | New sub-sub-section. 155 | #+end_src 156 | 157 | ** Numbered headings 158 | 159 | You can create numbered headings up to a certain level by setting an option: 160 | 161 | #+begin_src org 162 | ,#+OPTIONS: H:4 163 | #+end_src 164 | 165 | * Paragraphs 166 | 167 | ** Normal 168 | 169 | #+begin_src org 170 | A single newline has no effect. 171 | This line is part of the same paragraph. 172 | 173 | But an empty line 174 | 175 | demarcates paragraphs. 176 | #+end_src 177 | 178 | ** Line breaks 179 | 180 | #+begin_src org 181 | By entering two consecutive backslashes, \\ 182 | you can force to break lines 183 | without starting a new paragraph. 184 | #+end_src 185 | 186 | ** Horizontal rules 187 | 188 | #+begin_src org 189 | For an horizontal line, insert at least 5 dashes: this is some text above an 190 | horizontal rule 191 | ----- 192 | and some text below it. 193 | #+end_src 194 | 195 | ** Text width 196 | 197 | # Premiere Elements, page 111 198 | # 199 | # Vous pouvez créer ces objets en cliquant sur le bouton Nouvel| élément de le 200 | # fenêtre Média. (Le Chapitre 14 explique comment créer| des titres ; le 201 | # Chapitre 15 montre l'utilisation des barres et ton, de la| vidéo noir et de 202 | # l'amorce SMPTE.) 203 | # 204 | # The principles of beautiful Web design, page 6 205 | # 206 | # In a figurative sense, the concept of visual balance is similar to that of 207 | # physical balance| illustrated by a seesaw. Just as physical objects have 208 | # weight, so do the elements of a layout.| If the elements on either side of a 209 | # layout are of equal weight, they balance one another.| There are two main forms 210 | # of visual balance: symmetrical and asymmetrical. 211 | 212 | One morning, when Gregor Samsa woke from troubled dreams, he found himself 213 | transformed in his bed into a horrible vermin. He lay on his armour-like back, 214 | and if he lifted his head a little he could see his brown belly, slightly domed 215 | and divided by arches into stiff sections. The bedding was hardly able to cover 216 | it and seemed ready to slide off any moment. His many legs, pitifully thin 217 | compared with the size of the rest of him, waved about helplessly as he looked. 218 | 219 | * Formatting text 220 | 221 | Text effects. 222 | 223 | ** Bold and italic 224 | 225 | #+begin_src org 226 | /Emphasize/ (italics), *strongly* (bold), and */very strongly/* (bold italics). 227 | #+end_src 228 | 229 | Markup elements can be nested: 230 | 231 | #+begin_src org 232 | This is /italic text which contains _underlined text_ within it/, whereas _this is 233 | normal underlined text_. 234 | #+end_src 235 | 236 | Markup can span across multiple lines, by default *no more than 2*: 237 | 238 | #+begin_src org 239 | *This 240 | is not 241 | bold.* 242 | #+end_src 243 | 244 | Org mode does not interpret a marker surrounded by alphanumeric characters as an 245 | emphasis marker. So, you can't (easily) emphasize just part of a word: 246 | 247 | #+begin_src org 248 | Not feas*ible*. 249 | #+end_src 250 | 251 | ** Monospace, superscript and subscript 252 | 253 | Other elements to use sparingly are: 254 | 255 | #+begin_src org 256 | - monospaced typewriter font for ~inline code~ 257 | - monospaced typewriter font for =verbatim text= 258 | - +deleted text+ (vs. _inserted text_) 259 | - text with super^{script}, such as 2^{10} 260 | - text with sub_{script}, such as H_{2}O 261 | #+end_src 262 | 263 | ** Smart punctuation 264 | 265 | If the XXX option is specified, Org mode will produce typographically correct 266 | output, converting straight quotes to curly quotes, ~---~ to em-dashes, ~--~ to 267 | en-dashes, and ~...~ to ellipses. 268 | 269 | * Lists 270 | 271 | Org markup allows you to create *bulleted* or *numbered* lists. It allows any 272 | combination of the two list types. 273 | 274 | ** Unordered lists 275 | 276 | Itemized lists are marked with bullets. Create them with a minus or a plus sign. 277 | 278 | They are convenient to organize data, and make the document prettier, and easier 279 | to read. 280 | 281 | #+begin_src org 282 | - Item with some lengthy text wrapping hopefully across several lines. We add 283 | a few words to really show the line wrapping. 284 | - Bullet. 285 | + Bullet. 286 | * Bullet. 287 | #+end_src 288 | 289 | ** Checklists 290 | 291 | #+begin_src org 292 | - [X] Checked. 293 | - [-] Half-checked. 294 | - [ ] Not checked. 295 | - Normal list item. 296 | #+end_src 297 | 298 | ** Ordered lists 299 | 300 | Enumerated lists are marked with numbers or letters: 301 | 302 | #+begin_src org 303 | 1. Arabic (decimal) numbered list item. We add a few words to show the line 304 | wrapping. 305 | A. Upper case alpha (letter) numbered list item. 306 | a. Lower alpha. 307 | b. Lower alpha. 308 | B. Upper alpha. 309 | 2. Number. 310 | #+end_src 311 | 312 | You can have ordered lists with jumping numbers: 313 | 314 | #+begin_src org 315 | 2. [@2] We start with point number 2. 316 | 3. Automatically numbered item. 317 | #+end_src 318 | 319 | ** Definition lists 320 | :PROPERTIES: 321 | :ID: f1a4a242-755b-4c38-9280-ee3f60e2b29a 322 | :END: 323 | 324 | Labeled, multi-line lists. 325 | 326 | #+begin_src org 327 | - First term to define :: 328 | Definition of the first term. We add a few words to show the line wrapping, 329 | to see what happens when you have long lines. 330 | 331 | - Second term :: 332 | Explication of the second term with *inline markup*. 333 | 334 | In many paragraphs. 335 | #+end_src 336 | 337 | ** Separating lists 338 | 339 | Adjacent lists sometimes like to fuse. To force the start of a new list, offset 340 | the two lists by an empty line comment: 341 | 342 | #+begin_src org 343 | - apples 344 | - oranges 345 | - bananas 346 | 347 | # Comment. 348 | 349 | - carrots 350 | - tomatoes 351 | - celery 352 | #+end_src 353 | 354 | * Tables 355 | 356 | Tables are one of the most refined areas of the Org mode syntax. They are very easy 357 | to create and to read. 358 | 359 | ** Simple table 360 | 361 | #+begin_src org 362 | | Cell in column 1, row 1 | Cell in column 2, row 1 | 363 | | Cell in column 1, row 2 | Cell in column 2, row 2 | 364 | #+end_src 365 | 366 | Org tables have cells of at most one line long: there is no such thing as 367 | a multi-line table cell in Org. 368 | 369 | ** Column formatting 370 | 371 | Columns are automatically aligned: 372 | 373 | - Number-rich columns to the right, and 374 | - String-rich columns to the left. 375 | 376 | *** Table with aligned cells 377 | 378 | If you want to override the automatic alignment, use ~~, ~~ or ~~. 379 | 380 | #+begin_src org 381 | ,#+CAPTION: Table with aligned columns 382 | | | | | 383 | | 1 | 2 | 3 | 384 | | Right | Center | Left | 385 | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | 386 | #+end_src 387 | 388 | *** Table with column size adjusted 389 | 390 | ** Header row 391 | 392 | You can create tables with an header row (by using an horizontal line of dashes 393 | to separate it from the rest of the table). 394 | 395 | #+begin_src org 396 | #+CAPTION: Table with an header row 397 | | Name of column 1 | Name of column 2 | Name of column 3 | 398 | |------------------+------------------+------------------| 399 | | Top left | Top middle | | 400 | | | | Right | 401 | | Bottom left | Bottom middle | | 402 | #+end_src 403 | 404 | ** A very long table 405 | 406 | To test "sticky table headers"... 407 | 408 | | Name of column 1 | Name of column 2 | Name of column 3 | 409 | |------------------+------------------+------------------| 410 | | Top left | Top middle | | 411 | | 2 | | | 412 | | 3 | | | 413 | | 4 | | | 414 | | 5 | | | 415 | | 6 | | | 416 | | 7 | | | 417 | | 8 | | | 418 | | 9 | | | 419 | | 10 | | | 420 | | 11 | | | 421 | | 12 | | | 422 | | 13 | | | 423 | | 14 | | | 424 | | 15 | | Right | 425 | | 16 | | | 426 | | 17 | | | 427 | | 18 | | | 428 | | 19 | | | 429 | | 20 | | | 430 | | 21 | | | 431 | | 22 | | | 432 | | 23 | | | 433 | | 24 | | | 434 | | 25 | | | 435 | | 26 | | | 436 | | 27 | | | 437 | | 28 | | | 438 | | 29 | | | 439 | | Bottom left | Bottom middle | | 440 | 441 | ** Table placement 442 | 443 | #+begin_src org 444 | #+ATTR_LATEX: :center nil 445 | | a | b | 446 | | 1 | 2 | 447 | #+end_src 448 | 449 | XXX Different from the following: 450 | 451 | #+begin_src org 452 | | a | b | 453 | | 1 | 2 | 454 | #+end_src 455 | 456 | ** Align tables on the page 457 | 458 | *** Left 459 | 460 | Here is a table on the left side: 461 | 462 | #+begin_src org 463 | ,#+LATEX: \noindent 464 | ,#+ATTR_LATEX: :center nil 465 | | a | b | c | 466 | |---+---+---| 467 | | 1 | 2 | 3 | 468 | | 4 | 5 | 6 | 469 | ,#+LATEX: \hfill 470 | #+end_src 471 | 472 | The ~noindent~ just gets rid of the indentation of the first line of a paragraph 473 | which in this case is the table. The ~hfill~ adds infinite stretch after the 474 | table, so it pushes the table to the left. 475 | 476 | *** Center 477 | 478 | Here is a centered table: 479 | 480 | #+begin_src org 481 | | a | b | c | 482 | |---+---+---| 483 | | 1 | 2 | 3 | 484 | | 4 | 5 | 6 | 485 | #+end_src 486 | 487 | *** Right 488 | 489 | And here's a table on the right side: 490 | 491 | #+begin_src org 492 | #+LATEX: \hfill 493 | #+ATTR_LATEX: :center nil 494 | | a | b | c | 495 | |---+---+---| 496 | | 1 | 2 | 3 | 497 | | 4 | 5 | 6 | 498 | #+end_src 499 | 500 | Here the ~hfill~ adds infinite stretch before the table, so it pushes the table 501 | to the right. 502 | 503 | ** Table size 504 | 505 | #+begin_src org 506 | #+ATTR_HTML: :width 100% 507 | | Cell in column 1, row 1 | Cell in column 2, row 1 | 508 | | Cell in column 1, row 2 | Cell in column 2, row 2 | 509 | #+end_src 510 | 511 | ** CSV 512 | 513 | You can fill a table from a CSV file using R commands. 514 | 515 | * Links 516 | :PROPERTIES: 517 | :CUSTOM_ID: links 518 | :END: 519 | 520 | #+begin_src org :eval no 521 | ,* Links 522 | :PROPERTIES: 523 | :CUSTOM_ID: links 524 | :END: 525 | #+end_src 526 | 527 | This document is available in [[file:README.org][plain text]], [[file:README.html][HTML]] and [[file:README.pdf][PDF]]. 528 | 529 | The links are delimited by double square brackets. 530 | 531 | ** External links 532 | 533 | #+begin_src org 534 | See http://www.pirilampo.org (automatic!) and the 535 | [[http://orgmode.org/][Org mode Web site]]. 536 | #+end_src 537 | 538 | *** Relative links 539 | 540 | #+begin_src org 541 | [[../README.html][Home]] 542 | #+end_src 543 | 544 | *** Email links 545 | 546 | #+begin_src org 547 | [[mailto:john.doe@example.com][email John Doe]] 548 | #+end_src 549 | 550 | *** Image links 551 | 552 | To get image links, put a link to a file in the description. 553 | 554 | #+begin_src org 555 | Clicking on the image [[http://orgmode.org/][file:images/org-mode-unicorn.png]] 556 | leads to the Org mode home page. 557 | #+end_src 558 | 559 | ** Internal links 560 | :PROPERTIES: 561 | :ID: 0d2b0cb2-116c-4a61-a076-4c641faf4346 562 | :END: 563 | 564 | *** Inline anchors 565 | 566 | Anchors are used to specify hypertext link targets. 567 | 568 | #+begin_src org 569 | <> Inline anchors make arbitrary content referenceable. 570 | #+end_src 571 | 572 | *** Internal cross references 573 | 574 | Links generally point to an headline. 575 | 576 | #+begin_src org 577 | See chapter [[#links][Links]]. 578 | #+end_src 579 | 580 | To add a link to a figure (e.g., "See Figure 1"), just do: 581 | 582 | #+begin_src org 583 | ,#+name: fig 584 | ,#+caption: caption 585 | [[file:fig.png]] 586 | 587 | See figure [[fig]]. 588 | #+end_src 589 | 590 | You can also create a hypertext link to a document anchor in the current 591 | document /or in another document/. 592 | 593 | #+begin_src org 594 | See: 595 | - Location [[anchor][cross reference]]. 596 | - Section [[id:0d2b0cb2-116c-4a61-a076-4c641faf4346][Internal links]] 597 | #+end_src 598 | 599 | ** Extensions that define new hyperlinks targets 600 | 601 | * Images 602 | 603 | You can insert *image* files of different *formats* to a document: 604 | 605 | | | HTML | PDF | 606 | |------+------------------------------+-----| 607 | | gif | yes | | 608 | | jpeg | yes | | 609 | | png | yes | | 610 | | bmp | (depends on browser support) | | 611 | 612 | ** Inline picture 613 | 614 | #+begin_src org 615 | #+caption: Org mode logo 616 | [[file:images/org-mode-unicorn.png]] 617 | #+end_src 618 | 619 | #+begin_src org 620 | Click to see the [[file:images/org-mode-unicorn.png][Unicorn picture]]. 621 | #+end_src 622 | 623 | ** Image alignment (using positioning) 624 | 625 | Books usually align/float images on the right/left of the contents. 626 | 627 | *** Image is left aligned 628 | 629 | *** Image is right aligned 630 | 631 | *** Image is centered 632 | 633 | #+name: test 634 | #+begin_src R :exports results :file-ext pdf :results graphics :width 8 :height 3 635 | plot(runif(100)) 636 | #+end_src 637 | 638 | #+attr_latex: :float t :placement [b] 639 | #+results: test 640 | [[file:test.pdf]] 641 | 642 | ** Image attributes and values 643 | 644 | XXX Available HTML image tags include ... 645 | 646 | | Attribute | Value(s) | 647 | |----------------+-----------------------------| 648 | | ~:alt~ | Alternate text | 649 | | ~:height~ | | 650 | | ~:width~ | User defined size in pixels | 651 | | ~:align~ | | 652 | | ~:border~ | | 653 | | ~:bordercolor~ | | 654 | | ~:hspace~ | | 655 | | ~:vspace~ | | 656 | | ~:title~ | User defined text | 657 | 658 | #+begin_src org 659 | #+ATTR_LaTeX: :width 0.25\linewidth 660 | [[file:images/org-mode-unicorn.png]] 661 | #+end_src 662 | 663 | Place images side by side: XXX 664 | 665 | ** Figures 666 | 667 | To define images that will be *treated as book illustrations* (figures) and 668 | automatically labeled and numbered, use XXX. 669 | 670 | * Videos 671 | 672 | Videos can't be added directly. 673 | 674 | Though, you can add an image with a link to the video like this: 675 | 676 | #+begin_src org 677 | [[http://www.youtube.com/watch?v=DnSGSiXYuOk][file:../bigblow.png]] 678 | #+end_src 679 | 680 | * Admonitions 681 | 682 | Admonitions (contextual backgrounds) are statements taken out of the content's 683 | flow and labeled with a title. 684 | 685 | Common admonitions are: 686 | 687 | 1. ~note~ 688 | 2. ~warning~ 689 | 3. ~tip~ 690 | 4. ~caution~ 691 | 5. ~important~ 692 | 693 | (Most themes style only ~note~ and ~warning~ specially.) 694 | 695 | ** List of supported admonitions :noexport: 696 | 697 | | Total | | docutils | rST | RTD | AsciiDoc | DocBook | MoinMoin (Modern) | Bootstrap | DocOnce | Confluence | SuperCollider | 698 | |--------+-----------+----------+-----+-----+----------+---------+-------------------+-----------+---------+------------+---------------| 699 | | 7 | note | 1 | 1 | 1 | 1 | 1 | 1 | | | 1 | 1 | 700 | | 9 | warning | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 701 | | 7 | tip | 1 | 1 | 1 | 1 | 1 | 1 | | | 1 | | 702 | |--------+-----------+----------+-----+-----+----------+---------+-------------------+-----------+---------+------------+---------------| 703 | | 6 | caution | 1 | 1 | 1 | 1 | 1 | 1 | | | | | 704 | | 6 | important | 1 | 1 | 1 | 1 | 1 | 1 | | | | | 705 | |--------+-----------+----------+-----+-----+----------+---------+-------------------+-----------+---------+------------+---------------| 706 | | 3 | attention | 1 | 1 | 1 | | | | | | | | 707 | | 3 | hint | 1 | 1 | 1 | | | | | | | | 708 | | 3 | error | 1 | 1 | 1 | | | | | | | | 709 | | 4 | danger | 1 | 1 | 1 | | | | 1 | | | | 710 | |--------+-----------+----------+-----+-----+----------+---------+-------------------+-----------+---------+------------+---------------| 711 | | #ERROR | seealso | | | ? | | | | | | | | 712 | | #ERROR | todo | | | ? | | | | | | | | 713 | |--------+-----------+----------+-----+-----+----------+---------+-------------------+-----------+---------+------------+---------------| 714 | | 2 | info | | | | | | | 1 | | 1 | | 715 | | 1 | notice | | | | | | | | 1 | | | 716 | | 1 | question | | | | | | | | 1 | | | 717 | | 1 | summary | | | | | | | | 1 | | | 718 | | 1 | success | | | | | | | 1 | | | | 719 | #+TBLFM: $1=vsum($3..$11) 720 | 721 | ** Base admonitions 722 | 723 | *** Note 724 | 725 | A note box is displayed as follows: 726 | 727 | #+begin_src org 728 | ,#+begin_note 729 | This is a useful note. 730 | ,#+end_note 731 | #+end_src 732 | 733 | # #+attr_html: :options [By the way...] 734 | # #+attr_latex: :options Test 735 | # #+begin_note 736 | # This is a useful note (with a title). 737 | # #+end_note 738 | 739 | *** Warning 740 | 741 | A warning box is displayed as follows: 742 | 743 | #+begin_src org 744 | ,#+begin_warning 745 | Be careful! Check that you have... 746 | ,#+end_warning 747 | #+end_src 748 | 749 | *** Tip 750 | 751 | A tip box is displayed as follows: 752 | 753 | #+begin_src org 754 | ,#+begin_tip 755 | Try doing it this way... 756 | ,#+end_tip 757 | #+end_src 758 | 759 | *** Caution 760 | 761 | #+begin_src org 762 | ,#+begin_caution 763 | Caution 764 | ,#+end_caution 765 | #+end_src 766 | 767 | *** Important 768 | 769 | #+begin_src org 770 | ,#+begin_important 771 | Important 772 | ,#+end_important 773 | #+end_src 774 | 775 | ** Additional admonitions 776 | 777 | *** Attention 778 | 779 | #+begin_src org 780 | ,#+begin_attention 781 | Attention 782 | ,#+end_attention 783 | #+end_src 784 | 785 | *** Hint 786 | 787 | #+begin_src org 788 | ,#+begin_hint 789 | Hint 790 | ,#+end_hint 791 | #+end_src 792 | 793 | *** Error 794 | 795 | #+begin_src org 796 | ,#+begin_error 797 | Error 798 | ,#+end_error 799 | #+end_src 800 | 801 | *** Danger 802 | 803 | #+begin_src org 804 | ,#+begin_danger 805 | Danger 806 | ,#+end_danger 807 | #+end_src 808 | 809 | *** SeeAlso (Sphinx additional) 810 | 811 | #+begin_src org 812 | ,#+begin_seealso 813 | - [[http://en.wikipedia.org/wiki/Apple][Apples]] :: 814 | A kind of [[http://en.wikipedia.org/wiki/Fruit][fruit]]. 815 | ,#+end_seealso 816 | #+end_src 817 | 818 | ** Todo admonition 819 | 820 | # See example at http://docs.ckan.org/en/latest/contributing/python.html 821 | # or http://wsgiservice.readthedocs.org/en/latest/todo.html 822 | 823 | Simple box ("inline task"): 824 | 825 | #+begin_src org 826 | *************** TODO Do this task 827 | Description of inline task. 828 | *************** END 829 | #+end_src 830 | 831 | *************** TODO Do this task 832 | Description of inline task. 833 | *************** END 834 | or: 835 | 836 | #+begin_src org 837 | *************** WAIT [#B] Do also this other task :phone: 838 | *************** END 839 | #+end_src 840 | 841 | #+begin_admonitiontodo 842 | Admonitiontodo 843 | #+end_admonitiontodo 844 | 845 | Alternatively to the inline tasks (for creating "TODO" annotations), if you want 846 | such notes not to show up in the published version, drawers may also do the job, 847 | e.g.: 848 | 849 | :FIXME: 850 | ... 851 | :END: 852 | 853 | You can then control what drawers are exported with 854 | ~org-export-with-drawers~ (or per document with d OPTIONS item). 855 | 856 | * Centered text 857 | 858 | #+begin_src org 859 | ,#+begin_left 860 | This text is \\ 861 | aligned to the left! 862 | ,#+end_left 863 | 864 | ,#+begin_center 865 | This text is \\ 866 | centered! 867 | ,#+end_center 868 | 869 | ,#+begin_right 870 | This text is \\ 871 | aligned to the right! 872 | ,#+end_right 873 | #+end_src 874 | 875 | * Sidebar 876 | 877 | #+begin_src org 878 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 879 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 880 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 881 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 882 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 883 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 884 | 885 | ,#+begin_sidebar 886 | Org mode was first released by Carsten Dominik in 2004 as an outlining and 887 | project planning tool. Further development turned it into a general tool that 888 | can be used to author professional documents like LaTeX. 889 | ,#+end_sidebar 890 | 891 | Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac 892 | turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor 893 | sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies 894 | mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien 895 | ullamcorper pharetra. Vestibulum erat wisi... 896 | 897 | Phasellus ut libero. Nulla in libero non enim tristique sollicitudin. Ut 898 | tempor. Phasellus pellentesque augue eget ante. Mauris malesuada. Donec sit 899 | amet diam sit amet dolor placerat blandit. Morbi enim purus, imperdiet in, 900 | molestie sit amet, pellentesque eu, mauris. In vel erat vel ipsum bibendum 901 | commodo. Curabitur accumsan. Nam sed metus. Etiam tristique bibendum justo. 902 | #+end_src 903 | 904 | * Example 905 | 906 | You can have ~example~ blocks. 907 | 908 | #+begin_src org 909 | : 10/17/97 9:04 bin 910 | : 10/16/97 14:11 DOS 911 | : 10/16/97 14:46 TEMP 912 | : 10/16/97 14:37 WINNT 913 | : 10/16/97 14:25 119 AUTOEXEC.BAT 914 | : 2/13/94 6:21 54,619 COMMAND.COM 915 | #+end_src 916 | 917 | or 918 | 919 | #+begin_src org 920 | ,#+begin_example 921 | 10/17/97 9:04 bin 922 | 10/16/97 14:11 DOS 923 | 10/16/97 14:46 TEMP 924 | 10/16/97 14:37 WINNT 925 | 10/16/97 14:25 119 AUTOEXEC.BAT 926 | 2/13/94 6:21 54,619 COMMAND.COM 927 | ,#+end_example 928 | #+end_src 929 | 930 | * Prose excerpts 931 | 932 | ** Quote 933 | 934 | Use the ~quote~ block for content that *doesn't require the preservation of line 935 | breaks*. 936 | 937 | #+begin_src org 938 | ,#+begin_quote 939 | Let us change our traditional attitude to the construction of programs: 940 | Instead of imagining that our main task is to instruct a computer what to do, 941 | let us concentrate rather on explaining to human beings what we want a 942 | computer to do. 943 | 944 | The practitioner of literate programming can be regarded as an essayist, whose 945 | main concern is with exposition and excellence of style. Such an author, with 946 | thesaurus in hand, chooses the names of variables carefully and explains what 947 | each variable means. He or she strives for a program that is comprehensible 948 | because its concepts have been introduced in an order that is best for human 949 | understanding, using a mixture of formal and informal methods that reinforce 950 | each other. 951 | 952 | -- Donald Knuth 953 | ,#+end_quote 954 | #+end_src 955 | 956 | A short one: 957 | 958 | #+begin_src org 959 | ,#+begin_quote 960 | Everything should be made as simple as possible, 961 | but not any simpler. -- Albert Einstein 962 | ,#+end_quote 963 | #+end_src 964 | 965 | ** Verse 966 | 967 | In a ~verse~ environment, there is an *implicit line break at the end of each line*, 968 | and *indentation* is preserved: 969 | 970 | #+begin_src org 971 | ,#+begin_verse 972 | Everything should be made as simple as possible, 973 | but not any simpler. -- Albert Einstein 974 | ,#+end_verse 975 | #+end_src 976 | 977 | Typically used for quoting passages of an email message: 978 | 979 | #+begin_src org 980 | ,#+begin_verse 981 | >> The meeting has been postponed to next Friday. 982 | > 983 | > Has the deadline for the report been moved too? 984 | 985 | Yes. And chekout http://www.doodle.com/ for rescheduling the meeting. 986 | 987 | In the text body, 988 | indentation is 989 | preserved. 990 | ,#+end_verse 991 | #+end_src 992 | 993 | ** Block quote with optional attribution line 994 | 995 | #+begin_epigraph 996 | epigraph 997 | #+end_epigraph 998 | 999 | ** Block quotes with their own class attribute 1000 | 1001 | #+begin_highlights 1002 | highlights 1003 | #+end_highlights 1004 | 1005 | #+begin_pull-quote 1006 | pull-quote 1007 | #+end_pull-quote 1008 | 1009 | #+begin_blockquote 1010 | Blockquote 1011 | #+end_blockquote 1012 | 1013 | ** Non-breaking space 1014 | 1015 | Insert the Unicode character ~00A0~ to add a non-breaking space. 1016 | 1017 | FIXME Or add/use an Org entity? Or use tilde? 1018 | 1019 | * Comments 1020 | 1021 | #+begin_src org 1022 | It's possible to add comments in the document. 1023 | 1024 | # This Org comment here won't be displayed. 1025 | #+end_src 1026 | 1027 | #+begin_note 1028 | Org doesn't support *comments inside paragraphs* since a comment ends 1029 | a paragraph. However, you can mimic inline comments with export snippets, e.g., 1030 | ~@@comment:...@@~. 1031 | #+end_note 1032 | 1033 | #+begin_tip 1034 | If you have tables (for example) that you want to ignore during export, one possibility 1035 | is to use *comment blocks* or ~:noexport:~ subtrees. Another possibility is to 1036 | *use* non-exported *drawers* (see #+OPTIONS: d:). 1037 | #+end_tip 1038 | 1039 | If you want to ignore that part only during export, but still want to 1040 | use keep it active in the buffer, I suggest to use a drawer, with an 1041 | appropriate `org-export-with-drawers' value, e.g., 1042 | 1043 | #+begin_src org 1044 | ,#+OPTIONS: d:(not "NOEXPORT") 1045 | #+end_src 1046 | 1047 | * Substitutions 1048 | 1049 | ** General replacements 1050 | 1051 | #+begin_src org :eval no 1052 | ,#+MACRO: longtext this very very long text 1053 | 1054 | Insert {{{longtext}}} wherever required. 1055 | #+end_src 1056 | 1057 | #+MACRO: longtext this very very long text 1058 | 1059 | Insert {{{longtext}}} wherever required. 1060 | 1061 | ** Styled references 1062 | 1063 | #+BEGIN_SRC org :eval no 1064 | ,#+MACRO: color @@html:$2@@ 1065 | 1066 | {{{color(blue, This text is colored in blue.)}}} 1067 | 1068 | {{{color(red, This other text is in red.)}}} 1069 | #+END_SRC 1070 | 1071 | #+MACRO: color @@html:$2@@ 1072 | 1073 | {{{color(blue, This text is colored in blue.)}}} 1074 | 1075 | {{{color(red, This other text is in red.)}}} 1076 | 1077 | Find more macros on [[https://github.com/fniessen/org-macros][GitHub]]. 1078 | 1079 | ** Special characters 1080 | 1081 | We also use substitutions to include some of the widely used Unicode characters 1082 | (like ©, converted from text characters to its typographically correct entity). 1083 | 1084 | *** Accents 1085 | 1086 | #+begin_src org 1087 | - \Agrave \Aacute 1088 | #+end_src 1089 | 1090 | *** Punctuation 1091 | 1092 | #+begin_src org 1093 | - Dash: \ndash \mdash 1094 | - Marks: \iexcl \iquest 1095 | - Quotations: \laquo \raquo 1096 | - Miscellaneous: \para \ordf 1097 | #+end_src 1098 | 1099 | *** Commercial symbols 1100 | 1101 | #+begin_src org 1102 | - Property marks: \copy \reg 1103 | - Currency: \cent \EUR \yen \pound 1104 | #+end_src 1105 | 1106 | *** Greek characters 1107 | 1108 | #+begin_src org 1109 | The Greek letters \alpha, \beta, and \gamma are used to denote angles. 1110 | #+end_src 1111 | 1112 | *** Math characters 1113 | 1114 | #+begin_src org 1115 | - Science: \pm \div 1116 | - Arrows: \to \rarr \larr \harr \rArr \lArr \hArr 1117 | - Function names: \arccos \cos 1118 | - Signs and symbols: \bull \star 1119 | #+end_src 1120 | 1121 | *** Misc 1122 | 1123 | #+begin_src org 1124 | - Zero-width non-joiner: \zwnj 1125 | # Smilies: \smiley \sad 1126 | - Suits: \clubs \spades 1127 | #+end_src 1128 | 1129 | #+begin_note 1130 | You can insert a real "zero-width space" Unicode character by pressing 1131 | ~C-x 8 RET zero width space RET~ or ~C-x 8 RET 200b RET~. 1132 | #+end_note 1133 | 1134 | * Source code 1135 | 1136 | ** Inline code 1137 | 1138 | #+begin_src org 1139 | Reference code like ~variables~ or ~functions~ inline. 1140 | #+end_src 1141 | 1142 | You can also evaluate code inline as follows: 1 + 1 is src_R{1 + 1}. 1143 | 1144 | ** Code blocks (with syntax highlighting) 1145 | 1146 | The source code blocks support syntax highlighting: 1147 | 1148 | #+begin_src cpp :eval no 1149 | /* 1150 | * Application that displays a "Hello" message to the standard output. 1151 | */ 1152 | int main(int arc, char **argv) 1153 | { 1154 | printf("Hello, %s!\n", (argc>1) ? argv[1] : "World"); 1155 | return 0; 1156 | } 1157 | #+end_src 1158 | 1159 | #+begin_src emacs-lisp :eval no 1160 | (defvar hello "Hello") 1161 | 1162 | (defun hello (name &optional greeting) 1163 | (message "%s %s" (or greeting "Hello") name)) 1164 | 1165 | (setq tab-width 4) 1166 | #+end_src 1167 | 1168 | # See http://sphinxcontrib-emacs.readthedocs.org/en/latest/guide/domain.html 1169 | 1170 | #+begin_note 1171 | You need =htmlize.el= in your ~load-path~, for the HTML export. 1172 | #+end_note 1173 | 1174 | ** Source mode 1175 | 1176 | The following language strings are currently recognized: 1177 | 1178 | #+begin_src emacs-lisp :results drawer :exports results 1179 | (concat (mapconcat (lambda (widget) 1180 | (widget-get widget :tag)) 1181 | (cl-remove-if-not (lambda (it) 1182 | (and (consp it) 1183 | (eq (car it) 'const))) 1184 | (cdr 1185 | (widget-get 1186 | (get 1187 | 'org-babel-load-languages 'custom-type) 1188 | :key-type))) 1189 | ", ") 1190 | ".") 1191 | #+end_src 1192 | 1193 | #+results: 1194 | :RESULTS: 1195 | Awk, C, R, Asymptote, Calc, Clojure, CSS, Ditaa, Dot, Emacs Lisp, 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, ebnf2ps. 1196 | :END: 1197 | 1198 | ** Line break 1199 | 1200 | Code block with long lines: 1201 | 1202 | #+begin_src emacs-lisp :eval no 1203 | testing testing testing testing testing testing testing testing testing testing 1204 | 0 1 2 3 4 5 6 7 8 9 1205 | 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456 1206 | #+end_src 1207 | 1208 | For PDF (LaTeX), one solution is to surround the code block such as: 1209 | 1210 | #+latex: \scriptsize 1211 | #+begin_src R 1212 | print("This block is in scriptsize") 1213 | #+end_src 1214 | #+latex: \normalize 1215 | 1216 | ** Line numbers 1217 | 1218 | Both in ~example~ and in ~src~ snippets, you can add a ~-n~ switch to the end of the 1219 | ~begin~ line to get the lines numbered: 1220 | 1221 | #+header: :eval no 1222 | #+begin_src emacs-lisp -n 1223 | (defun org-xor (a b) 1224 | "Exclusive or." 1225 | #+end_src 1226 | 1227 | If you use a ~+n~ switch, the numbering from the previous numbered snippet will 1228 | be continued in the current one: 1229 | 1230 | #+header: :eval no 1231 | #+begin_src emacs-lisp +n 1232 | (if a (not b) b)) 1233 | #+end_src 1234 | 1235 | ** Callouts 1236 | 1237 | In literal examples, Org will interpret strings like ~(ref:name)~ as labels, and 1238 | use them as targets for special hyperlinks like ~[[(name)]]~ (i.e., the reference 1239 | name enclosed in single parenthesis). In HTML, hovering the mouse over such 1240 | a link will remote-highlight the corresponding code line, which is kind of 1241 | cool. 1242 | 1243 | You can also add a ~-r~ switch which removes the labels from the source code. 1244 | With the ~-n~ switch, links to these references will be labeled by the line 1245 | numbers from the code listing, otherwise links will use the labels with no 1246 | parentheses. Here is an example: 1247 | 1248 | #+header: :eval no 1249 | #+begin_src emacs-lisp -n -r 1250 | (save-excursion ; (ref:sc) 1251 | (goto-char (point-min))) ; (ref:jump) 1252 | #+end_src 1253 | 1254 | In line [[(sc)]], we remember the current position. [[(jump)][Line (jump)]] jumps to 1255 | ~point-min~. 1256 | 1257 | * Math 1258 | 1259 | You can embed LaTeX math formatting in Org mode files. 1260 | 1261 | ** Inline math expressions 1262 | 1263 | For *inline math* expressions, use the parentheses notation ~\(...\)~: 1264 | 1265 | #+begin_src org 1266 | The formula \(a^2 + b^2 = c^2\) has been discovered by Pythagoras. 1267 | 1268 | Let \(a=\sin(x) + \cos(x)\). Then \(a^2 = 2\sin(x)\cos(x)\) because \(\sin^2x + 1269 | \cos^2x = 1\). 1270 | #+end_src 1271 | 1272 | #+begin_warning 1273 | It's /not/ advised to use the ~$...$~ construct (both for Org and for MathJax). 1274 | 1275 | Don't forget that ~$~ is also a valid currency symbol! 1276 | #+end_warning 1277 | 1278 | ** Math expressions in display mode 1279 | 1280 | For mathematical expressions which you want to make *stand out, centered on their 1281 | own lines*, use ~\[...\]~: 1282 | 1283 | #+begin_src org 1284 | The /Euler theorem/: 1285 | 1286 | \[ 1287 | \int_0^\infty e^{-x^2} dx = {{\sqrt{\pi}} \over {2}} 1288 | \] 1289 | 1290 | LaTeX allows to inline such ~\[...\]~ constructs (/quadratic formula/): 1291 | \[ \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a} \] 1292 | #+end_src 1293 | 1294 | #+begin_warning 1295 | Double dollar signs (~$$~) should not be used. 1296 | #+end_warning 1297 | 1298 | #+begin_src org 1299 | \[ 1300 | \left( \int_{0}^{\infty} \frac{\sin x}{\sqrt x}\,\mathrm{d}x \ 1301 | right)^{2} - 1302 | \prod_{k=1}^{\infty} \frac{4k^{2}}{4k^{2}-1} + 1303 | \frac{\lambda}{2n}\sum_{k=1} ^{n} \theta_{k} ^{2} x^{n} = 0 1304 | \] 1305 | #+end_src 1306 | 1307 | The equation may be wrong, but it's a nice one! 1308 | 1309 | ** Equation numbers 1310 | 1311 | Differently from ~$...$~ and ~\(...\)~, an equation environment produces a *numbered* 1312 | equation to which you can add a label and reference the equation by (label) name 1313 | in other parts of the text. This is not possibly with unnumbered math 1314 | environments (~$$~, ...). 1315 | 1316 | #+begin_src org 1317 | The /Pythagoras theorem/: 1318 | 1319 | ,#+name: pythag 1320 | \begin{equation} 1321 | a^2 + b^2 = c^2 1322 | \end{equation} 1323 | 1324 | See equation [[pythag]]. 1325 | 1326 | # The /sinus theorem/ can be written as the equation: 1327 | # 1328 | # \begin{equation} 1329 | # \label{eqn:sinalpha} 1330 | # \frac{\sin\alpha}{a}=\frac{\sin\beta}{b} 1331 | # \end{equation} 1332 | # 1333 | # See equation [[eqn:sinalpha]]. 1334 | #+end_src 1335 | 1336 | Only captioned equations are numbered. 1337 | 1338 | Other alternatives: use 1339 | - ~\begin{equation*}~ or 1340 | - ~\begin{displaymath}~ (= the verbose form of the ~\[...\]~ construct). 1341 | 1342 | ~M-q~ does not fill those. 1343 | 1344 | * Miscellaneous effects 1345 | 1346 | ** Include Org files 1347 | 1348 | You can include another Org file and skip its title by using the ~:lines~ argument 1349 | to ~#+INCLUDE~: 1350 | 1351 | #+begin_src org 1352 | ,#+INCLUDE: chapter1.org :lines "2-" 1353 | #+end_src 1354 | 1355 | #+begin_note 1356 | File inclusion, through INCLUDE keywords, is an *export-only feature*. 1357 | #+end_note 1358 | 1359 | ** Raw HTML 1360 | 1361 | # http://johnmacfarlane.net/pandoc/README.html 1362 | 1363 | You can include raw HTML in your Org documents and it will get kept as HTML 1364 | when it's exported. 1365 | 1366 | #+HTML_BEGIN:
1367 | Text can be preformatted (in a fixed-width font).
1368 | #+HTML_END: 
1369 | 1370 | It is especially useful for more advanced stuff like images or tables where you 1371 | need more control of the HTML options than Org mode actually gives you. 1372 | 1373 | Similarly, you can incorporate JS or do anything else you can do in a Web page 1374 | (such as importing a CSS file). 1375 | 1376 | *** Native DIV blocks 1377 | 1378 | You can create named classes (to get style control from your CSS) with: 1379 | 1380 | #+begin_example 1381 | ,#+begin_myclass 1382 | This text is wrapped in a myclass DIV... 1383 | ,#+end_myclass 1384 | #+end_example 1385 | 1386 | You can also add interactive elements to the HTML such as interactive R plots. 1387 | 1388 | Finally, you can include an HTML file verbatim (during export) with: 1389 | 1390 | #+begin_src org 1391 | ,#+INCLUDE: file.html html 1392 | #+end_src 1393 | 1394 | Don't edit the exported HTML file! 1395 | 1396 | ** Raw LaTeX 1397 | 1398 | You can also use raw LaTeX. XXX 1399 | 1400 | #+LaTeX_BEGIN: \begin{verbatim} 1401 | Text can be preformatted (in a fixed-width font). 1402 | #+LaTeX_END: \end{verbatim} 1403 | 1404 | * Footnotes  1405 | 1406 | #+begin_src org 1407 | It is possible to define named footnotes[fn:myfootnote], or ones with automatic 1408 | anchors[fn:2]. 1409 | #+end_src 1410 | 1411 | #+results: 1412 | It is possible to define named footnotes[fn:myfootnote], or ones with automatic 1413 | anchors[fn:2]. 1414 | 1415 | * Useful extensions 1416 | 1417 | ** Todo extension 1418 | 1419 | *** Dates 1420 | 1421 | Timestamps: [2014-01-16 Thu] and <2014-01-16 Thu>. 1422 | 1423 | *** TODO We need to achieve... 1424 | 1425 | *** DONE [#A] Buy GTD book :online: 1426 | :LOGBOOK: 1427 | - State "TODO" -> "DONE" [2014-01-16 Thu 09:52] 1428 | :END: 1429 | 1430 | By default, ~DONE~ actions will be collapsed. 1431 | 1432 | Note that I should probably implement that default behavior only for ~ARCHIVE~'d 1433 | items. 1434 | 1435 | *** TODO [#A] Read GTD book 1436 | SCHEDULED: <2014-09-11 Thu> 1437 | 1438 | By default, *all* (active) entries will be expanded at page load, so that their 1439 | contents is visible. 1440 | 1441 | That can be changed by adding such a line (into your Org document): 1442 | 1443 | #+begin_src org :eval no 1444 | ,#+HTML_HEAD: 1445 | #+end_src 1446 | 1447 | *** TODO [#B] Apply GTD methodoloy 1448 | DEADLINE: <2014-12-01 Mon> 1449 | :PROPERTIES: 1450 | :HTML_CONTAINER_CLASS: hsCollapsed 1451 | :END: 1452 | 1453 | This section will be collapsed when loading the page because the entry has the 1454 | value ~hsCollapsed~ for the property ~:HTML_CONTAINER_CLASS:~. 1455 | 1456 | Powerful, no? 1457 | 1458 | *** Some note :computer:write: 1459 | 1460 | You can add tags to any entry, and hightlight all entries having some specific 1461 | tag by clicking on the buttons made accessible to you in the "Dashboard". 1462 | 1463 | *** Weekly review :computer: 1464 | 1465 | Now, you can even make your weekly review in the HTML export... Press the ~r~ key 1466 | to start entering the "review mode" where all but one active entry are 1467 | collapsed, so that you can really focus on one item at a time! 1468 | 1469 | ** Bigblow extension 1470 | 1471 | The string ~fixme~ (in *upper case*) gets replaced by a "Fix Me!" image: 1472 | 1473 | #+begin_src org 1474 | FIXME Delete this... 1475 | #+end_src 1476 | 1477 | * Graphs with Graphviz 1478 | 1479 | To enable the Graphviz extension, we have to add it to the extensions list in 1480 | the ~org-babel-load-languages~ variable. 1481 | 1482 | #+begin_src emacs-lisp :exports code 1483 | (add-to-list 'org-babel-load-languages '(dot . t)) 1484 | (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages) 1485 | #+end_src 1486 | 1487 | It uses directly the ~dot~ command to process DOT language. 1488 | 1489 | ** Undirected 1490 | 1491 | #+begin_src org 1492 | ,#+begin_src dot :file images/graph.png :cmdline -Tpng 1493 | graph foo { 1494 | "bar" -- "baz"; 1495 | } 1496 | ,#+end_src 1497 | #+end_src 1498 | 1499 | ** Directed 1500 | 1501 | #+begin_src org :exports results 1502 | ,#+begin_src dot :file images/digraph.png :cmdline -Tpng 1503 | digraph foo { 1504 | "bar" -> "baz"; 1505 | } 1506 | ,#+end_src 1507 | #+end_src 1508 | 1509 | * Graphs with R 1510 | 1511 | The output from the *execution* of programs, scripts or commands can be inserted 1512 | in the document itself, allowing you to work in the /reproducible research/ 1513 | mindset. 1514 | 1515 | To enable the Graphviz extension, we have to add it to the extensions list in 1516 | the ~org-babel-load-languages~ variable. 1517 | 1518 | #+begin_src emacs-lisp :exports code 1519 | (add-to-list 'org-babel-load-languages '(R . t)) ; Requires R and ess-mode. 1520 | (org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages) 1521 | #+end_src 1522 | 1523 | It uses directly the ~R~ command to process R language. 1524 | 1525 | ** Example 1526 | 1527 | Data to be charted: 1528 | 1529 | #+name: data 1530 | | Month | Degrees | 1531 | |-------+---------| 1532 | | 01 | 3.8 | 1533 | | 02 | 4.1 | 1534 | | 03 | 6.3 | 1535 | | 04 | 9.0 | 1536 | | 05 | 11.9 | 1537 | | 06 | 15.1 | 1538 | | 07 | 17.1 | 1539 | | 08 | 17.4 | 1540 | | 09 | 15.7 | 1541 | | 10 | 11.8 | 1542 | | 11 | 7.7 | 1543 | | 12 | 4.8 | 1544 | 1545 | Code: 1546 | 1547 | #+name: R-plot 1548 | #+begin_src R :var data=data :results graphics :file images/Rplot.png :exports both 1549 | plot(data, type="b", bty="l", col=c("#ABD249"), las=1, lwd=4) 1550 | grid(nx=NULL, ny=NULL, col=c("#E8E8E8"), lwd=1) 1551 | legend("bottom", legend=c("Degrees"), col=c("#ABD249"), pch=c(19)) 1552 | #+end_src 1553 | 1554 | The resulting chart: 1555 | 1556 | #+results: R-plot 1557 | [[file:images/Rplot.png]] 1558 | 1559 | ** COMMENT ggplot2 1560 | 1561 | #+begin_src R :results output graphics :file foo.png :session *foo* 1562 | library(ggplot2) 1563 | ggplot(data.frame(x = rnorm(10), y = rnorm(10)), 1564 | aes(x = x, y = y)) + 1565 | geom_point() 1566 | #+end_src 1567 | 1568 | * Citations 1569 | 1570 | Cross-referenced to bibliography. 1571 | 1572 | * Appendix 1573 | 1574 | Special sections. 1575 | 1576 | ** Index 1577 | 1578 | Index (or list of acronyms). 1579 | 1580 | - Write index entries 1581 | 1582 | #+index: Org-mode 1583 | 1584 | Note that multi-entry terms generate separate index entries. 1585 | 1586 | #+index: Definitions!Org-mode 1587 | 1588 | - Place the index at the desired location 1589 | 1590 | - Produce the index by updating ~org-latex-pdf-process~ 1591 | 1592 | #+BIND: org-latex-pdf-process ("pdflatex %b" "bibtex %b" "pdflatex %b" "pdflatex %b") 1593 | 1594 | ** Bibliography 1595 | 1596 | The bibliography... 1597 | 1598 | - Eric Steven Raymond. The Art of Unix Programming. Addison-Wesley. ISBN 1599 | 0-13-142901-9. 1600 | 1601 | # http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html 1602 | 1603 | ** Glossary 1604 | 1605 | Glossaries are optional. Glossaries entries are an example of [[id:f1a4a242-755b-4c38-9280-ee3f60e2b29a][definition lists]]. 1606 | 1607 | - A glossary term :: 1608 | The corresponding (indented) definition. 1609 | 1610 | - A second glossary term :: 1611 | The corresponding (indented) definition. 1612 | 1613 | * Contributing 1614 | 1615 | ** Issues 1616 | 1617 | Report issues and suggest features and improvements on the [[https://github.com/fniessen/refcard-org-mode/issues/new][GitHub issue tracker]]. 1618 | 1619 | ** Patches 1620 | 1621 | I love contributions! Patches under any form are always welcome! 1622 | 1623 | ** Donations 1624 | 1625 | If you like the refcard-org-mode project, you can show your appreciation and 1626 | help support future development by making a [[https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=VCVAS6KPDQ4JC&lc=BE&item_number=refcard%2dorg%2dmode¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted][donation]] through PayPal. 1627 | 1628 | Regardless of the donations, refcard-org-mode will always be free both as in 1629 | beer and as in speech. 1630 | 1631 | * License 1632 | 1633 | Copyright (C) 2014-2016 Fabrice Niessen. 1634 | 1635 | Author: Fabrice Niessen \\ 1636 | Keywords: org-mode refcard 1637 | 1638 | This program is free software; you can redistribute it and/or modify it under 1639 | the terms of the GNU General Public License as published by the Free Software 1640 | Foundation, either version 3 of the License, or (at your option) any later 1641 | version. 1642 | 1643 | This program is distributed in the hope that it will be useful, but WITHOUT ANY 1644 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 1645 | A PARTICULAR PURPOSE. See the GNU General Public License for more details. 1646 | 1647 | You should have received a copy of the GNU General Public License along with 1648 | this program. If not, see http://www.gnu.org/licenses/. 1649 | 1650 | #+begin_export html 1651 | 1652 | :license-gpl-blue.svg 1653 | 1654 | 1655 | 1656 | btn_donate_LG.gif 1657 | 1658 | #+end_export 1659 | 1660 | * Footnotes 1661 | 1662 | [fn:myfootnote] Extensively used in large documents. 1663 | 1664 | [fn:2] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 1665 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 1666 | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 1667 | commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit 1668 | esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat 1669 | non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 1670 | 1671 | #+BIND: org-hide-emphasis-markers nil 1672 | 1673 | # This is for the sake of Emacs. 1674 | # Local Variables: 1675 | # org-hide-emphasis-markers: nil 1676 | # End: 1677 | -------------------------------------------------------------------------------- /README.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | Org mode syntax 9 | 10 | 11 | 13 | 14 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 125 | 127 | 128 | 129 |
130 | UP 131 | | 132 | HOME 133 |
134 |

Org mode syntax 135 |
136 | Quick reference card 137 |

138 |
139 |

Table of Contents

140 |
141 | 299 |
300 |
301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 |
FrameworkOrg mode 8
Bug trackerhttps://github.com/fniessen/refcard-org-mode/issues
Sourcehttps://github.com/fniessen/refcard-org-mode
326 | 327 |
328 |

Summary

329 |
330 | 343 | 344 |
345 |

346 | This is an Org mode document, using the .org extension (supported by GitHub). 347 |

348 | 349 |

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 |
365 |
366 |
367 | 368 |
369 |

Reference card

370 |
371 |
372 |

Table of Contents

373 |
374 | 532 |
533 |
534 |
535 |
536 | 537 |
538 |

Document header

539 |
540 |

541 | Title and author line: 542 |

543 | 544 |
545 | 546 |
#+TITLE:     Org mode syntax examples
 547 | #+AUTHOR:    Fabrice Niessen
 548 | 
 549 | My document provides...
 550 | 
551 |
552 | 553 |

554 | It’s a good practice to also include an email line following the author line. 555 |

556 | 557 |
558 | 559 |
#+EMAIL:     john.doe@example.com
 560 | 
561 |
562 |
563 |
564 | 565 |
566 |

Document settings

567 |
568 |
569 |

Document description

570 |
571 |
572 | 573 |
#+DESCRIPTION: This document catalogs a set of tips and tricks for composing documents in Org mode.
 574 | #+KEYWORDS:  org-mode, syntax, quick reference, cheat sheet, recommended practices, latex, beamer, html
 575 | #+LANGUAGE:  en
 576 | 
577 |
578 |
579 |
580 | 581 |
582 |

Section numbering

583 |
584 |
585 | 586 |
#+OPTIONS:   H:4
 587 | 
588 |
589 | 590 |
591 | 592 |
#+OPTIONS:   num:nil
 593 | 
594 |
595 |
596 |
597 | 598 |
599 |

Table of contents

600 |
601 |

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 |

605 | 606 |
607 | 608 |
#+OPTIONS:   toc:2
 609 | 
610 |
611 | 612 |
613 | 614 |
#+OPTIONS:   p:t
 615 | 
616 |
617 | 618 |
619 |

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 |

623 | 624 |
625 | 626 |

627 | To locally insert the TOC at some random place, use the #+TOC: headlines [n] 628 | feature; for example: 629 |

630 | 631 |
632 | 633 |
#+TOC: headlines 2
 634 | 
635 |
636 |
637 |
638 | 639 |
640 |

List of figures

641 |
642 |

643 | #+TOC: figures is not implemented yet in the HMTL backend. 644 |

645 |
646 |
647 | 648 |
649 |

List of tables

650 |
651 |

652 | #+TOC: tables is already implemented in the HTML backend. 653 |

654 |
655 |
656 | 657 |
658 |

List of equations

659 |
660 |
661 | 662 |
663 |

Section titles (headings)

664 |
665 |
666 | 667 |
* Biggest heading (level 1)
 668 | 
 669 | New chapter.
 670 | 
671 |
672 | 673 |
674 | 675 |
** 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 |
688 |
689 |
690 |

Bigger heading (level 2)

691 |
692 |

693 | New section. 694 |

695 |
696 | 697 |
698 |

Big heading (level 3)

699 |
700 |

701 | New sub-section. 702 |

703 |
704 | 705 |
706 |
Heading (level 4)
707 |
708 |

709 | New sub-sub-section. 710 |

711 |
712 |
713 |
714 |
715 | 716 |
717 |

Numbered headings

718 |
719 |

720 | You can create numbered headings up to a certain level by setting an option: 721 |

722 | 723 |
724 | 725 |
#+OPTIONS: H:4
 726 | 
727 |
728 |
729 |
730 |
731 | 732 |
733 |

Paragraphs

734 |
735 |
736 |

Normal

737 |
738 |
739 | 740 |
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 |
748 | 749 |

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 |
762 |
763 | 764 |
765 |

Line breaks

766 |
767 |
768 | 769 |
By entering two consecutive backslashes, \\
 770 | you can force to break lines
 771 | without starting a new paragraph.
 772 | 
773 |
774 | 775 |

776 | By entering two consecutive backslashes,
777 | you can force to break lines 778 | without starting a new paragraph. 779 |

780 |
781 |
782 | 783 |
784 |

Horizontal rules

785 |
786 |
787 | 788 |
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 |
794 | 795 |

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 |
804 |
805 | 806 |
807 |

Text width

808 |
809 |

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 |
818 |
819 |
820 | 821 |
822 |

Formatting text

823 |
824 |

825 | Text effects. 826 |

827 |
828 | 829 |
830 |

Bold and italic

831 |
832 |
833 | 834 |
Emphasize (italics), strongly (bold), and /very strongly/ (bold italics).
 835 | 
836 |
837 | 838 |

839 | Emphasize (italics), strongly (bold), and very strongly (bold italics). 840 |

841 | 842 |

843 | Markup elements can be nested: 844 |

845 | 846 |
847 | 848 |
This is italic text which contains underlined text within it, whereas this is
 849 | normal underlined text.
 850 | 
851 |
852 | 853 |

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 |
863 | 864 |
*This
 865 | is not
 866 | bold.*
 867 | 
868 |
869 | 870 |

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 |
882 | 883 |
Not feas*ible*.
 884 | 
885 |
886 | 887 |

888 | Not feas*ible*. 889 |

890 |
891 |
892 | 893 |
894 |

Monospace, superscript and subscript

895 |
896 |

897 | Other elements to use sparingly are: 898 |

899 | 900 |
901 | 902 |
- monospaced typewriter font for inline code
 903 | - monospaced typewriter font for verbatim text
 904 | - deleted text (vs. inserted text)
 905 | - text with superscript, such as 210
 906 | - text with subscript, such as H2O
 907 | 
908 |
909 | 910 |
    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 |
917 |
918 |
919 | 920 |
921 |

Smart punctuation

922 |
923 |

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 |

928 |
929 |
930 |
931 | 932 |
933 |

Lists

934 |
935 |

936 | Org markup allows you to create bulleted or numbered lists. It allows any 937 | combination of the two list types. 938 |

939 |
940 | 941 |
942 |

Unordered lists

943 |
944 |

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 |
954 | 955 |
- 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 |
962 | 963 |
    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 |
974 |
975 |
976 | 977 |
978 |

Checklists

979 |
980 |
981 | 982 |
- [X] Checked.
 983 | - [-] Half-checked.
 984 | - [ ] Not checked.
 985 | - Normal list item.
 986 | 
987 |
988 | 989 |
    990 |
  • ☑ Checked.
  • 991 |
  • ☐ Half-checked.
  • 992 |
  • ☐ Not checked.
  • 993 |
  • Normal list item.
  • 994 |
995 |
996 |
997 | 998 |
999 |

Ordered lists

1000 |
1001 |

1002 | Enumerated lists are marked with numbers or letters: 1003 |

1004 | 1005 |
1006 | 1007 |
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 |
1016 | 1017 |
    1018 |
  1. Arabic (decimal) numbered list item. We add a few words to show the line 1019 | wrapping. 1020 |
      1021 |
    1. Upper case alpha (letter) numbered list item. 1022 |
        1023 |
      1. Lower alpha.
      2. 1024 |
      3. Lower alpha.
      4. 1025 |
    2. 1026 |
    3. Upper alpha.
    4. 1027 |
  2. 1028 |
  3. Number.
  4. 1029 |
1030 | 1031 |

1032 | You can have ordered lists with jumping numbers: 1033 |

1034 | 1035 |
1036 | 1037 |
2. [@2] We start with point number 2.
1038 | 3. Automatically numbered item.
1039 | 
1040 |
1041 | 1042 |
    1043 |
  1. We start with point number 2.
  2. 1044 |
  3. Automatically numbered item.
  4. 1045 |
1046 |
1047 |
1048 | 1049 |
1050 |

Definition lists

1051 |
1052 |

1053 | Labeled, multi-line lists. 1054 |

1055 | 1056 |
1057 | 1058 |
- 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 |
1068 | 1069 |
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 |
1081 |
1082 |
1083 | 1084 |
1085 |

Separating lists

1086 |
1087 |

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 |
1093 | 1094 |
- apples
1095 | - oranges
1096 | - bananas
1097 | 
1098 | # Comment.
1099 | 
1100 | - carrots
1101 | - tomatoes
1102 | - celery
1103 | 
1104 |
1105 | 1106 |
    1107 |
  • apples
  • 1108 |
  • oranges
  • 1109 |
  • bananas
  • 1110 |
1111 | 1112 |
    1113 |
  • carrots
  • 1114 |
  • tomatoes
  • 1115 |
  • celery
  • 1116 |
1117 |
1118 |
1119 |
1120 | 1121 |
1122 |

Tables

1123 |
1124 |

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 |
1129 | 1130 |
1131 |

Simple table

1132 |
1133 |
1134 | 1135 |
| 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 |
1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | 1149 | 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 |
Cell in column 1, row 1Cell in column 2, row 1
Cell in column 1, row 2Cell in column 2, row 2
1160 | 1161 |

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 |
1166 |
1167 | 1168 |
1169 |

Column formatting

1170 |
1171 |

1172 | Columns are automatically aligned: 1173 |

1174 | 1175 |
    1176 |
  • Number-rich columns to the right, and
  • 1177 |
  • String-rich columns to the left.
  • 1178 |
1179 |
1180 | 1181 |
1182 |

Table with aligned cells

1183 |
1184 |

1185 | If you want to override the automatic alignment, use <r>, <c> or <l>. 1186 |

1187 | 1188 |
1189 | 1190 |
#+CAPTION: Table with aligned columns
1191 | |          <r> | <c>          | <l>          |
1192 | |            1 | 2            | 3            |
1193 | |        Right | Center       | Left         |
1194 | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
1195 | 
1196 |
1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 |
Table 1: Table with aligned columns
123
RightCenterLeft
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1228 |
1229 |
1230 | 1231 |
1232 |

Table with column size adjusted

1233 |
1234 |
1235 | 1236 |
1237 |

Header row

1238 |
1239 |

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 |
1245 | 1246 |
#+CAPTION: 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 |
1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 |
Table 2: Table with an header row
Name of column 1Name of column 2Name of column 3
Top leftTop middle 
  Right
Bottom leftBottom middle 
1292 |
1293 |
1294 | 1295 |
1296 |

A very long table

1297 |
1298 |

1299 | To test “sticky table headers”… 1300 |

1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 |
Name of column 1Name of column 2Name of column 3
Top leftTop middle 
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15 Right
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
Bottom leftBottom middle 
1501 |
1502 |
1503 | 1504 |
1505 |

Table placement

1506 |
1507 |
1508 | 1509 |
#+ATTR_LATEX: :center nil
1510 | | a | b |
1511 | | 1 | 2 |
1512 | 
1513 |
1514 | 1515 | 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 |
ab
12
1535 | 1536 |

1537 | XXX Different from the following: 1538 |

1539 | 1540 |
1541 | 1542 |
| a | b |
1543 | | 1 | 2 |
1544 | 
1545 |
1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 |
ab
12
1567 |
1568 |
1569 | 1570 |
1571 |

Align tables on the page

1572 |
1573 |
1574 |

Left

1575 |
1576 |

1577 | Here is a table on the left side: 1578 |

1579 | 1580 |
1581 | 1582 |
#+LATEX: \noindent
1583 | #+ATTR_LATEX: :center nil
1584 | | a | b | c |
1585 | |---+---+---|
1586 | | 1 | 2 | 3 |
1587 | | 4 | 5 | 6 |
1588 | #+LATEX: \hfill
1589 | 
1590 |
1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 |
abc
123
456
1623 |

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 |

1628 |
1629 |
1630 | 1631 |
1632 |

Center

1633 |
1634 |

1635 | Here is a centered table: 1636 |

1637 | 1638 |
1639 | 1640 |
| a | b | c |
1641 | |---+---+---|
1642 | | 1 | 2 | 3 |
1643 | | 4 | 5 | 6 |
1644 | 
1645 |
1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 |
abc
123
456
1678 |
1679 |
1680 | 1681 |
1682 |

Right

1683 |
1684 |

1685 | And here’s a table on the right side: 1686 |

1687 | 1688 |
1689 | 1690 |
#+LATEX: \hfill
1691 | #+ATTR_LATEX: :center nil
1692 | | a | b | c |
1693 | |---+---+---|
1694 | | 1 | 2 | 3 |
1695 | | 4 | 5 | 6 |
1696 | 
1697 |
1698 | 1699 | 1700 | 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 |
abc
123
456
1730 | 1731 |

1732 | Here the hfill adds infinite stretch before the table, so it pushes the table 1733 | to the right. 1734 |

1735 |
1736 |
1737 |
1738 | 1739 |
1740 |

Table size

1741 |
1742 |
1743 | 1744 |
#+ATTR_HTML: :width 100%
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 |
1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 1769 |
Cell in column 1, row 1Cell in column 2, row 1
Cell in column 1, row 2Cell in column 2, row 2
1770 |
1771 |
1772 | 1773 |
1774 |

CSV

1775 |
1776 |

1777 | You can fill a table from a CSV file using R commands. 1778 |

1779 |
1780 |
1781 |
1782 | 1783 |
1784 | 1785 | 1803 | 1804 |
1805 |

External links

1806 |
1807 |
1808 | 1809 |
See http://www.pirilampo.org (automatic!) and the
1810 | Org mode Web site.
1811 | 
1812 |
1813 | 1814 |

1815 | See http://www.pirilampo.org/ (automatic!) and the 1816 | Org mode Web site. 1817 |

1818 |
1819 | 1820 |
1821 |

Relative links

1822 |
1823 |
1824 | 1825 |
Home
1826 | 
1827 |
1828 | 1829 |

1830 | Home 1831 |

1832 |
1833 |
1834 | 1835 |
1836 |

Email links

1837 |
1838 |
1839 | 1840 |
email John Doe
1841 | 
1842 |
1843 | 1844 |

1845 | email John Doe 1846 |

1847 |
1848 |
1849 | 1850 |
1851 |

Image links

1852 |
1853 |

1854 | To get image links, put a link to a file in the description. 1855 |

1856 | 1857 |
1858 | 1859 |
Clicking on the image file:images/org-mode-unicorn.png
1860 | leads to the Org mode home page.
1861 | 
1862 |
1863 | 1864 |

1865 | Clicking on the image org-mode-unicorn.png 1866 | leads to the Org mode home page. 1867 |

1868 |
1869 |
1870 |
1871 | 1872 |
1873 |

Internal links

1874 |
1875 |
1876 | 1877 |
1878 |

Inline anchors

1879 |
1880 |

1881 | Anchors are used to specify hypertext link targets. 1882 |

1883 | 1884 |
1885 | 1886 |
<<anchor>> Inline anchors make arbitrary content referenceable.
1887 | 
1888 |
1889 | 1890 |

1891 | Inline anchors make arbitrary content referenceable. 1892 |

1893 |
1894 |
1895 | 1896 |
1897 |

Internal cross references

1898 |
1899 |

1900 | Links generally point to an headline. 1901 |

1902 | 1903 |
1904 | 1905 |
See chapter Links.
1906 | 
1907 |
1908 | 1909 |

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 |
1918 | 1919 |
#+name: fig
1920 | #+caption: caption
1921 | file:fig.png
1922 | 
1923 | See figure fig.
1924 | 
1925 |
1926 | 1927 | 1928 |
1929 |

fig.png 1930 |

1931 |

Figure 1: caption

1932 |
1933 | 1934 |

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 |
1944 | 1945 |
See:
1946 | - Location cross reference.
1947 | - Section Internal links
1948 | 
1949 |
1950 | 1951 |

1952 | See: 1953 |

1954 | 1958 |
1959 |
1960 |
1961 | 1962 |
1963 |

Extensions that define new hyperlinks targets

1964 |
1965 |
1966 | 1967 |
1968 |

Images

1969 |
1970 |

1971 | You can insert image files of different formats to a document: 1972 |

1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 |
 HTMLPDF
gifyes 
jpegyes 
pngyes 
bmp(depends on browser support) 
2017 |
2018 | 2019 |
2020 |

Inline picture

2021 |
2022 |
2023 | 2024 |
#+caption: Org mode logo
2025 | file:images/org-mode-unicorn.png
2026 | 
2027 |
2028 | 2029 | 2030 |
2031 |

org-mode-unicorn.png 2032 |

2033 |

Figure 2: Org mode logo

2034 |
2035 | 2036 |
2037 | 2038 |
Click to see the Unicorn picture.
2039 | 
2040 |
2041 | 2042 |

2043 | Click to see the Unicorn picture. 2044 |

2045 |
2046 |
2047 | 2048 |
2049 |

Image alignment (using positioning)

2050 |
2051 |

2052 | Books usually align/float images on the right/left of the contents. 2053 |

2054 |
2055 | 2056 |
2057 |

Image is left aligned

2058 |
2059 | 2060 |
2061 |

Image is right aligned

2062 |
2063 | 2064 |
2065 |

Image is centered

2066 |
2067 |

2068 | test.pdf 2069 |

2070 |
2071 |
2072 |
2073 | 2074 |
2075 |

Image attributes and values

2076 |
2077 |

2078 | XXX Available HTML image tags include … 2079 |

2080 | 2081 | 2082 | 2083 | 2084 | 2085 | 2086 | 2087 | 2088 | 2089 | 2090 | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | 2101 | 2102 | 2103 | 2104 | 2105 | 2106 | 2107 | 2108 | 2109 | 2110 | 2111 | 2112 | 2113 | 2114 | 2115 | 2116 | 2117 | 2118 | 2119 | 2120 | 2121 | 2122 | 2123 | 2124 | 2125 | 2126 | 2127 | 2128 | 2129 | 2130 | 2131 | 2132 | 2133 | 2134 | 2135 | 2136 | 2137 | 2138 | 2139 | 2140 | 2141 |
AttributeValue(s)
:altAlternate text
:height 
:widthUser defined size in pixels
:align 
:border 
:bordercolor 
:hspace 
:vspace 
:titleUser defined text
2142 | 2143 |
2144 | 2145 |
#+ATTR_LaTeX: :width 0.25\linewidth
2146 | file:images/org-mode-unicorn.png
2147 | 
2148 |
2149 | 2150 | 2151 |
2152 |

org-mode-unicorn.png 2153 |

2154 |
2155 | 2156 |

2157 | Place images side by side: XXX 2158 |

2159 |
2160 |
2161 | 2162 |
2163 |

Figures

2164 |
2165 |

2166 | To define images that will be treated as book illustrations (figures) and 2167 | automatically labeled and numbered, use XXX. 2168 |

2169 |
2170 |
2171 |
2172 | 2173 |
2174 |

Videos

2175 |
2176 |

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 |
2185 | 2186 |
file:../bigblow.png
2187 | 
2188 |
2189 | 2190 | 2191 |
2192 |

bigblow.png 2193 |

2194 |
2195 |
2196 |
2197 | 2198 |
2199 |

Admonitions

2200 |
2201 |

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 |
  1. note
  2. 2212 |
  3. warning
  4. 2213 |
  5. tip
  6. 2214 |
  7. caution
  8. 2215 |
  9. important
  10. 2216 |
2217 | 2218 |

2219 | (Most themes style only note and warning specially.) 2220 |

2221 |
2222 | 2223 |
2224 |

Base admonitions

2225 |
2226 |
2227 |

Note

2228 |
2229 |

2230 | A note box is displayed as follows: 2231 |

2232 | 2233 |
2234 | 2235 |
#+begin_note
2236 | This is a useful note.
2237 | #+end_note
2238 | 
2239 |
2240 | 2241 |
2242 |

2243 | This is a useful note. 2244 |

2245 | 2246 |
2247 |
2248 |
2249 | 2250 |
2251 |

Warning

2252 |
2253 |

2254 | A warning box is displayed as follows: 2255 |

2256 | 2257 |
2258 | 2259 |
#+begin_warning
2260 | Be careful!  Check that you have...
2261 | #+end_warning
2262 | 
2263 |
2264 | 2265 |
2266 |

2267 | Be careful! Check that you have… 2268 |

2269 | 2270 |
2271 |
2272 |
2273 | 2274 |
2275 |

Tip

2276 |
2277 |

2278 | A tip box is displayed as follows: 2279 |

2280 | 2281 |
2282 | 2283 |
#+begin_tip
2284 | Try doing it this way...
2285 | #+end_tip
2286 | 
2287 |
2288 | 2289 |
2290 |

2291 | Try doing it this way… 2292 |

2293 | 2294 |
2295 |
2296 |
2297 | 2298 |
2299 |

Caution

2300 |
2301 |
2302 | 2303 |
#+begin_caution
2304 | Caution
2305 | #+end_caution
2306 | 
2307 |
2308 | 2309 |
2310 |

2311 | Caution 2312 |

2313 | 2314 |
2315 |
2316 |
2317 | 2318 |
2319 |

Important

2320 |
2321 |
2322 | 2323 |
#+begin_important
2324 | Important
2325 | #+end_important
2326 | 
2327 |
2328 | 2329 |
2330 |

2331 | Important 2332 |

2333 | 2334 |
2335 |
2336 |
2337 |
2338 | 2339 |
2340 |

Additional admonitions

2341 |
2342 |
2343 |

Attention

2344 |
2345 |
2346 | 2347 |
#+begin_attention
2348 | Attention
2349 | #+end_attention
2350 | 
2351 |
2352 | 2353 |
2354 |

2355 | Attention 2356 |

2357 | 2358 |
2359 |
2360 |
2361 | 2362 |
2363 |

Hint

2364 |
2365 |
2366 | 2367 |
#+begin_hint
2368 | Hint
2369 | #+end_hint
2370 | 
2371 |
2372 | 2373 |
2374 |

2375 | Hint 2376 |

2377 | 2378 |
2379 |
2380 |
2381 | 2382 |
2383 |

Error

2384 |
2385 |
2386 | 2387 |
#+begin_error
2388 | Error
2389 | #+end_error
2390 | 
2391 |
2392 | 2393 |
2394 |

2395 | Error 2396 |

2397 | 2398 |
2399 |
2400 |
2401 | 2402 |
2403 |

Danger

2404 |
2405 |
2406 | 2407 |
#+begin_danger
2408 | Danger
2409 | #+end_danger
2410 | 
2411 |
2412 | 2413 |
2414 |

2415 | Danger 2416 |

2417 | 2418 |
2419 |
2420 |
2421 | 2422 |
2423 |

SeeAlso (Sphinx additional)

2424 |
2425 |
2426 | 2427 |
#+begin_seealso
2428 | - Apples ::
2429 |      A kind of fruit.
2430 | #+end_seealso
2431 | 
2432 |
2433 | 2434 |
2435 |
2436 |
Apples
A kind of fruit.
2437 |
2438 | 2439 |
2440 |
2441 |
2442 |
2443 | 2444 |
2445 |

Todo admonition

2446 |
2447 |

2448 | Simple box (“inline task”): 2449 |

2450 | 2451 |
2452 | 2453 |
*************** TODO Do this task
2454 | Description of inline task.
2455 | *************** END
2456 | 
2457 |
2458 | 2459 |

2460 | * TODO Do this task 2461 | Description of inline task. 2462 |

2463 |
2464 | END
2465 | nil
2466 | 2467 |
2468 | TODO Do this task
2469 |

2470 | Description of inline task. 2471 |

2472 |
2473 |

2474 | or: 2475 |

2476 | 2477 |
2478 | 2479 |
*************** WAIT [#B] Do also this other task                        :phone:
2480 | *************** END
2481 | 
2482 |
2483 | 2484 |

2485 | * WAIT [#B] Do also this other task :phone: 2486 |

2487 |
2488 | END
2489 | nil
2490 | 2491 |
2492 |

2493 | Admonitiontodo 2494 |

2495 | 2496 |
2497 | 2498 |

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 |

2512 |
2513 |
2514 |
2515 | 2516 |
2517 |

Centered text

2518 |
2519 |
2520 | 2521 |
#+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 |
2537 | 2538 |
2539 |

2540 | This text is
2541 | aligned to the left! 2542 |

2543 | 2544 |
2545 | 2546 |
2547 |

2548 | This text is
2549 | centered! 2550 |

2551 |
2552 | 2553 |
2554 |

2555 | This text is
2556 | aligned to the right! 2557 |

2558 | 2559 |
2560 |
2561 |
2562 | 2563 |
2564 |

Sidebar

2565 |
2566 |
2567 | 2568 |
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 |
2594 | 2595 |

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 |
2629 |
2630 | 2631 |
2632 |

Example

2633 |
2634 |

2635 | You can have example blocks. 2636 |

2637 | 2638 |
2639 | 2640 |
: 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 |
2648 | 2649 |
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 |
2663 | 2664 |
#+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 |
2674 | 2675 |
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 |
2684 |
2685 | 2686 |
2687 |

Prose excerpts

2688 |
2689 |
2690 |

Quote

2691 |
2692 |

2693 | Use the quote block for content that doesn't require the preservation of line 2694 | breaks. 2695 |

2696 | 2697 |
2698 | 2699 |
#+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 |
2717 | 2718 |
2719 |

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 |
2740 | 2741 |

2742 | A short one: 2743 |

2744 | 2745 |
2746 | 2747 |
#+begin_quote
2748 | Everything should be made as simple as possible,
2749 | but not any simpler. -- Albert Einstein
2750 | #+end_quote
2751 | 
2752 |
2753 | 2754 |
2755 |

2756 | Everything should be made as simple as possible, 2757 | but not any simpler. – Albert Einstein 2758 |

2759 |
2760 |
2761 |
2762 | 2763 |
2764 |

Verse

2765 |
2766 |

2767 | In a verse environment, there is an implicit line break at the end of each line, 2768 | and indentation is preserved: 2769 |

2770 | 2771 |
2772 | 2773 |
#+begin_verse
2774 | Everything should be made as simple as possible,
2775 | but not any simpler. -- Albert Einstein
2776 | #+end_verse
2777 | 
2778 |
2779 | 2780 |

2781 | Everything should be made as simple as possible,
2782 | but not any simpler. – Albert Einstein
2783 |

2784 | 2785 |

2786 | Typically used for quoting passages of an email message: 2787 |

2788 | 2789 |
2790 | 2791 |
#+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 |
2804 | 2805 |

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 |

2816 |
2817 |
2818 | 2819 |
2820 |

Block quote with optional attribution line

2821 |
2822 |
2823 |

2824 | epigraph 2825 |

2826 | 2827 |
2828 |
2829 |
2830 | 2831 |
2832 |

Block quotes with their own class attribute

2833 |
2834 |
2835 |

2836 | highlights 2837 |

2838 | 2839 |
2840 | 2841 |
2842 |

2843 | pull-quote 2844 |

2845 | 2846 |
2847 | 2848 |
2849 |

2850 | Blockquote 2851 |

2852 | 2853 |
2854 |
2855 |
2856 | 2857 |
2858 |

Non-breaking space

2859 |
2860 |

2861 | Insert the Unicode character 00A0 to add a non-breaking space. 2862 |

2863 | 2864 |

2865 | FIXME Or add/use an Org entity? Or use tilde? 2866 |

2867 |
2868 |
2869 |
2870 | 2871 |
2872 |

Comments

2873 |
2874 |
2875 | 2876 |
It's possible to add comments in the document.
2877 | 
2878 | # This Org comment here won't be displayed.
2879 | 
2880 |
2881 | 2882 |

2883 | It’s possible to add comments in the document. 2884 |

2885 | 2886 |
2887 |

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 |

2892 | 2893 |
2894 | 2895 |
2896 |

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 |

2901 | 2902 |
2903 | 2904 |

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 |
2911 | 2912 |
#+OPTIONS: d:(not "NOEXPORT")
2913 | 
2914 |
2915 |
2916 |
2917 | 2918 |
2919 |

Substitutions

2920 |
2921 |
2922 |

General replacements

2923 |
2924 |
2925 | 2926 |
#+MACRO: longtext this very very long text
2927 | 
2928 | Insert longtext wherever required.
2929 | 
2930 |
2931 | 2932 |

2933 | Insert this very very long text wherever required. 2934 |

2935 |
2936 |
2937 | 2938 |
2939 |

Styled references

2940 |
2941 |
2942 | 2943 |
#+MACRO: color @@html:<span style="color: $1">$2</span>@@
2944 | 
2945 | color(blue, This text is colored in blue.)
2946 | 
2947 | color(red, This other text is in red.)
2948 | 
2949 |
2950 | 2951 |

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 |
2963 |
2964 | 2965 |
2966 |

Special characters

2967 |
2968 |

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 |
2973 | 2974 |
2975 |

Accents

2976 |
2977 |
2978 | 2979 |
- \Agrave \Aacute
2980 | 
2981 |
2982 | 2983 |
    2984 |
  • À Á
  • 2985 |
2986 |
2987 |
2988 | 2989 |
2990 |

Punctuation

2991 |
2992 |
2993 | 2994 |
- Dash: \ndash \mdash
2995 | - Marks: \iexcl \iquest
2996 | - Quotations: \laquo \raquo
2997 | - Miscellaneous: \para \ordf
2998 | 
2999 |
3000 | 3001 |
    3002 |
  • Dash: – —
  • 3003 |
  • Marks: ¡ ¿
  • 3004 |
  • Quotations: « »
  • 3005 |
  • Miscellaneous: ¶ ª
  • 3006 |
3007 |
3008 |
3009 | 3010 |
3011 |

Commercial symbols

3012 |
3013 |
3014 | 3015 |
- Property marks: \copy \reg
3016 | - Currency: \cent \EUR \yen \pound
3017 | 
3018 |
3019 | 3020 |
    3021 |
  • Property marks: © ®
  • 3022 |
  • Currency: ¢ € ¥ £
  • 3023 |
3024 |
3025 |
3026 | 3027 |
3028 |

Greek characters

3029 |
3030 |
3031 | 3032 |
The Greek letters \alpha, \beta, and \gamma are used to denote angles.
3033 | 
3034 |
3035 | 3036 |

3037 | The Greek letters α, β, and γ are used to denote angles. 3038 |

3039 |
3040 |
3041 | 3042 |
3043 |

Math characters

3044 |
3045 |
3046 | 3047 |
- Science: \pm \div
3048 | - Arrows: \to \rarr \larr \harr \rArr \lArr \hArr
3049 | - Function names: \arccos \cos
3050 | - Signs and symbols: \bull \star
3051 | 
3052 |
3053 | 3054 |
    3055 |
  • Science: ± ÷
  • 3056 |
  • Arrows: → → ← ↔ ⇒ ⇐ ⇔
  • 3057 |
  • Function names: arccos cos
  • 3058 |
  • Signs and symbols: • *
  • 3059 |
3060 |
3061 |
3062 | 3063 |
3064 |

Misc

3065 |
3066 |
3067 | 3068 |
- Zero-width non-joiner: \zwnj
3069 | # Smilies: \smiley \sad
3070 | - Suits: \clubs \spades
3071 | 
3072 |
3073 | 3074 |
    3075 |
  • Zero-width non-joiner: ‌
  • 3076 |
3077 |
    3078 |
  • Suits: ♣ ♠
  • 3079 |
3080 | 3081 |
3082 |

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 |

3086 | 3087 |
3088 |
3089 |
3090 |
3091 |
3092 | 3093 |
3094 |

Source code

3095 |
3096 |
3097 |

Inline code

3098 |
3099 |
3100 | 3101 |
Reference code like variables or functions inline.
3102 | 
3103 |
3104 | 3105 |

3106 | Reference code like variables or functions inline. 3107 |

3108 | 3109 |

3110 | You can also evaluate code inline as follows: 1 + 1 is 1 + 1 3111 | 2. 3112 |

3113 |
3114 |
3115 | 3116 |
3117 |

Code blocks (with syntax highlighting)

3118 |
3119 |

3120 | The source code blocks support syntax highlighting: 3121 |

3122 | 3123 |
3124 | 3125 |
/*
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 |
3135 | 3136 |
3137 | 3138 |
(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 |
3146 | 3147 |
3148 |

3149 | You need htmlize.el in your load-path, for the HTML export. 3150 |

3151 | 3152 |
3153 |
3154 |
3155 | 3156 |
3157 |

Source mode

3158 |
3159 |

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 |
3167 |
3168 | 3169 |
3170 |

Line break

3171 |
3172 |

3173 | Code block with long lines: 3174 |

3175 | 3176 |
3177 | 3178 |
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 |
3183 | 3184 |

3185 | For PDF (LaTeX), one solution is to surround the code block such as: 3186 |

3187 | 3188 |
3189 | 3190 |
print("This block is in scriptsize")
3191 | 
3192 |
3193 | 3194 |
3195 | This block is in scriptsize
3196 | 
3197 |
3198 |
3199 | 3200 |
3201 |

Line numbers

3202 |
3203 |

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 |

3207 | 3208 |
3209 | 3210 |
1: (defun org-xor (a b)
3211 | 2:   "Exclusive or."
3212 | 
3213 |
3214 | 3215 |

3216 | If you use a +n switch, the numbering from the previous numbered snippet will 3217 | be continued in the current one: 3218 |

3219 | 3220 |
3221 | 3222 |
3:   (if a (not b) b))
3223 | 
3224 |
3225 |
3226 |
3227 | 3228 |
3229 |

Callouts

3230 |
3231 |

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 |

3238 | 3239 |

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 |

3245 | 3246 |
3247 | 3248 |
1: (save-excursion                  ;
3249 | 2:   (goto-char (point-min)))       ;
3250 | 
3251 |
3252 | 3253 |

3254 | In line 1, we remember the current position. Line 2 jumps to 3255 | point-min. 3256 |

3257 |
3258 |
3259 |
3260 | 3261 |
3262 |

Math

3263 |
3264 |

3265 | You can embed LaTeX math formatting in Org mode files. 3266 |

3267 |
3268 | 3269 |
3270 |

Inline math expressions

3271 |
3272 |

3273 | For inline math expressions, use the parentheses notation \(...\): 3274 |

3275 | 3276 |
3277 | 3278 |
The formula \(a^2 + b^2 = c^2\) has been discovered by Pythagoras.
3279 | 
3280 | Let \(a=\sin(x) + \cos(x)\). Then \(a^2 = 2\sin(x)\cos(x)\) because \(\sin^2x +
3281 | \cos^2x = 1\).
3282 | 
3283 |
3284 | 3285 |

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 |
3295 |

3296 | It’s not advised to use the $...$ construct (both for Org and for MathJax). 3297 |

3298 | 3299 |

3300 | Don’t forget that $ is also a valid currency symbol! 3301 |

3302 | 3303 |
3304 |
3305 |
3306 | 3307 |
3308 |

Math expressions in display mode

3309 |
3310 |

3311 | For mathematical expressions which you want to make stand out, centered on their 3312 | own lines, use \[...\]: 3313 |

3314 | 3315 |
3316 | 3317 |
The Euler theorem:
3318 | 
3319 | \[
3320 | \int_0^\infty e-x^2 dx = {{\sqrt{\pi}} \over {2}}
3321 | \]
3322 | 
3323 | LaTeX allows to inline such \[...\] constructs (quadratic formula):
3324 | \[ \frac{-b \pm \sqrt{b^2 - 4 a c}}{2a} \]
3325 | 
3326 |
3327 | 3328 |

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 |

3342 | 3343 |
3344 |

3345 | Double dollar signs ($$) should not be used. 3346 |

3347 | 3348 |
3349 | 3350 |
3351 | 3352 |
\[
3353 | \left( \int0\infty \frac{\sin x}{\sqrt x}\,\mathrm{d}x \
3354 | right)2 -
3355 | \prodk=1\infty \frac{4k2}{4k2-1} +
3356 | \frac{\lambda}{2n}\sumk=1 ^{n} \thetak ^{2} xn = 0
3357 | \]
3358 | 
3359 |
3360 | 3361 |

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 |
3374 |
3375 | 3376 |
3377 |

Equation numbers

3378 |
3379 |

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 |

3385 | 3386 |
3387 | 3388 |
The Pythagoras theorem:
3389 | 
3390 | #+name: pythag
3391 | \begin{equation}
3392 | a^2 + b^2 = c^2
3393 | \end{equation}
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 |
3407 | 3408 |

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 |
3431 | 3432 |

3433 | M-q does not fill those. 3434 |

3435 |
3436 |
3437 |
3438 | 3439 |
3440 |

Miscellaneous effects

3441 |
3442 |
3443 |

Include Org files

3444 |
3445 |

3446 | You can include another Org file and skip its title by using the :lines argument 3447 | to #+INCLUDE: 3448 |

3449 | 3450 |
3451 | 3452 |
#+INCLUDE: chapter1.org :lines "2-"
3453 | 
3454 |
3455 | 3456 |
3457 |

3458 | File inclusion, through INCLUDE keywords, is an export-only feature. 3459 |

3460 | 3461 |
3462 |
3463 |
3464 | 3465 |
3466 |

Raw HTML

3467 |
3468 |

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 |
3486 | 3487 |
3488 |

Native DIV blocks

3489 |
3490 |

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 |
3509 | 3510 |
#+INCLUDE: file.html html
3511 | 
3512 |
3513 | 3514 |

3515 | Don’t edit the exported HTML file! 3516 |

3517 |
3518 |
3519 |
3520 | 3521 |
3522 |

Raw LaTeX

3523 |
3524 |

3525 | You can also use raw LaTeX. XXX 3526 |

3527 | 3528 |

3529 | Text can be preformatted (in a fixed-width font). 3530 |

3531 |
3532 |
3533 |
3534 | 3535 |
3536 |

Footnotes 

3537 |
3538 |
3539 | 3540 |
It is possible to define named footnotes[fn:myfootnote], or ones with automatic
3541 | anchors[fn:2].
3542 | 
3543 |
3544 | 3545 |

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 |
3552 |
3553 | 3554 |
3555 |

Useful extensions

3556 |
3557 |
3558 |

Todo extension

3559 |
3560 |
3561 |

Dates

3562 |
3563 |

3564 | Timestamps: [2014-01-16 Thu] and <2014-01-16 Thu>. 3565 |

3566 |
3567 |
3568 | 3569 |
3570 |

TODO We need to achieve…

3571 |
3572 | 3573 |
3574 |

DONE [A] Buy GTD book   online

3575 |
3576 |
    3577 |
  • State “TODO” -> “DONE” [2014-01-16 Thu 09:52]
  • 3578 |
3579 | 3580 |

3581 | By default, DONE actions will be collapsed. 3582 |

3583 | 3584 |

3585 | Note that I should probably implement that default behavior only for ARCHIVE’d 3586 | items. 3587 |

3588 |
3589 |
3590 | 3591 |
3592 |

TODO [A] Read GTD book

3593 |
3594 |

SCHEDULED: <2014-09-11 Thu>

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 |
3606 | 3607 |
#+HTML_HEAD: <script> var HS_STARTUP_FOLDED = true; </script>
3608 | 
3609 |
3610 |
3611 |
3612 | 3613 |
3614 |

TODO [B] Apply GTD methodoloy

3615 |
3616 |

DEADLINE: <2014-12-01 Mon>

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 |

3621 | 3622 |

3623 | Powerful, no? 3624 |

3625 |
3626 |
3627 | 3628 |
3629 |

Some note   computer write

3630 |
3631 |

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 |
3636 |
3637 | 3638 |
3639 |

Weekly review   computer

3640 |
3641 |

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 |

3646 |
3647 |
3648 |
3649 | 3650 |
3651 |

Bigblow extension

3652 |
3653 |

3654 | The string fixme (in upper case) gets replaced by a “Fix Me!” image: 3655 |

3656 | 3657 |
3658 | 3659 |
FIXME Delete this...
3660 | 
3661 |
3662 | 3663 |

3664 | FIXME Delete this… 3665 |

3666 |
3667 |
3668 |
3669 | 3670 |
3671 |

Graphs with Graphviz

3672 |
3673 |

3674 | To enable the Graphviz extension, we have to add it to the extensions list in 3675 | the org-babel-load-languages variable. 3676 |

3677 | 3678 |
3679 | 3680 |
(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 |
3684 | 3685 |

3686 | It uses directly the dot command to process DOT language. 3687 |

3688 |
3689 | 3690 |
3691 |

Undirected

3692 |
3693 |
3694 | 3695 |
#+begin_src dot :file images/graph.png :cmdline -Tpng
3696 | graph foo {
3697 |         "bar" -- "baz";
3698 | }
3699 | #+end_src
3700 | 
3701 |
3702 | 3703 |
3704 | 3705 |
graph foo {
3706 |         "bar" -- "baz";
3707 | }
3708 | 
3709 |
3710 | 3711 | 3712 |
3713 |

graph.png 3714 |

3715 |
3716 |
3717 |
3718 | 3719 |
3720 |

Directed

3721 |
3722 |
3723 | 3724 |
digraph foo {
3725 |         "bar" -> "baz";
3726 | }
3727 | 
3728 |
3729 | 3730 | 3731 |
3732 |

digraph.png 3733 |

3734 |
3735 |
3736 |
3737 |
3738 | 3739 |
3740 |

Graphs with R

3741 |
3742 |

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 |

3752 | 3753 |
3754 | 3755 |
(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 |
3759 | 3760 |

3761 | It uses directly the R command to process R language. 3762 |

3763 |
3764 | 3765 |
3766 |

Example

3767 |
3768 |

3769 | Data to be charted: 3770 |

3771 | 3772 | 3773 | 3774 | 3775 | 3776 | 3777 | 3778 | 3779 | 3780 | 3781 | 3782 | 3783 | 3784 | 3785 | 3786 | 3787 | 3788 | 3789 | 3790 | 3791 | 3792 | 3793 | 3794 | 3795 | 3796 | 3797 | 3798 | 3799 | 3800 | 3801 | 3802 | 3803 | 3804 | 3805 | 3806 | 3807 | 3808 | 3809 | 3810 | 3811 | 3812 | 3813 | 3814 | 3815 | 3816 | 3817 | 3818 | 3819 | 3820 | 3821 | 3822 | 3823 | 3824 | 3825 | 3826 | 3827 | 3828 | 3829 | 3830 | 3831 | 3832 | 3833 | 3834 | 3835 | 3836 | 3837 | 3838 | 3839 | 3840 | 3841 | 3842 | 3843 | 3844 | 3845 | 3846 | 3847 |
MonthDegrees
013.8
024.1
036.3
049.0
0511.9
0615.1
0717.1
0817.4
0915.7
1011.8
117.7
124.8
3848 | 3849 |

3850 | Code: 3851 |

3852 | 3853 |
3854 | 3855 |
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 |
3860 | 3861 |

3862 | The resulting chart: 3863 |

3864 | 3865 | 3866 |
3867 |

Rplot.png 3868 |

3869 |
3870 |
3871 |
3872 |
3873 | 3874 |
3875 |

Citations

3876 |
3877 |

3878 | Cross-referenced to bibliography. 3879 |

3880 |
3881 |
3882 | 3883 |
3884 |

Appendix

3885 |
3886 |

3887 | Special sections. 3888 |

3889 |
3890 | 3891 |
3892 |

Index

3893 |
3894 |

3895 | Index (or list of acronyms). 3896 |

3897 | 3898 |
    3899 |
  • Write index entries
  • 3900 |
3901 | 3902 |

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 |
3911 |
3912 |
3913 | 3914 |
3915 |

Bibliography

3916 |
3917 |

3918 | The bibliography… 3919 |

3920 | 3921 |
    3922 |
  • Eric Steven Raymond. The Art of Unix Programming. Addison-Wesley. ISBN 3923 | 0-13-142901-9.
  • 3924 |
3925 |
3926 |
3927 | 3928 |
3929 |

Glossary

3930 |
3931 |

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 |
3940 |
3941 |
3942 |
3943 | 3944 |
3945 |

Contributing

3946 |
3947 |
3948 |

Issues

3949 |
3950 |

3951 | Report issues and suggest features and improvements on the GitHub issue tracker. 3952 |

3953 |
3954 |
3955 | 3956 |
3957 |

Patches

3958 |
3959 |

3960 | I love contributions! Patches under any form are always welcome! 3961 |

3962 |
3963 |
3964 | 3965 |
3966 |

Donations

3967 |
3968 |

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 |
3978 |
3979 |
3980 | 3981 |
3982 |

License

3983 |
3984 |

3985 | Copyright (C) 2014-2016 Fabrice Niessen. 3986 |

3987 | 3988 |

3989 | Author: Fabrice Niessen
3990 | Keywords: org-mode refcard 3991 |

3992 | 3993 |

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 | :license-gpl-blue.svg 4013 | 4014 | 4015 | 4016 | btn_donate_LG.gif 4017 | 4018 |
4019 |
4020 |
4021 |

Footnotes:

4022 |
4023 | 4024 |
1

4025 | Extensively used in large documents. 4026 |

4027 | 4028 |
2

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 |

4036 | 4037 | 4038 |
4039 |
4040 |
4041 |

Author: Fabrice Niessen

4042 |

Validate

4043 |
4044 | 4045 | 4046 | --------------------------------------------------------------------------------