RG Williams <rgwi...@gmail.com> writes: > Hi, > I know you can generate a table of contents when exporting, but can you do > it just within org? For context, I'm uploading an .org file to github and I > don't need to export it to another format because github recognizes and > displays it just fine. It's long so a ToC would be nice. Do I just have to > write it myself?
Calling ,-------------------------- | M-x org-org-export-as-org `-------------------------- on this org buffer #+begin_src org #+OPTIONS: toc:2 * A ** A1 ** A2 * B ** B1 ** B2 #+end_src yields this ,--------------------------------- | # Created 2014-04-01 Di 00:28 | #+TITLE: tmp<7> | #+AUTHOR: Thorsten Jolitz | #+OPTIONS: toc:2 | | * A | ** A1 | ** A2 | | * B | ** B1 | ** B2 | | # Emacs 24.3.1 (Org mode 8.2.5h) `--------------------------------- so unfortunately exporting with toc does not seem to be implemented in ox-org.el, but maybe you'll get better advice. -- cheers, Thorsten