From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Generate a table of contents without exporting Date: Tue, 01 Apr 2014 00:32:55 +0200 Message-ID: <874n2eov6w.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUkkE-0002L0-57 for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 18:32:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUkk5-0005te-Oo for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 18:31:54 -0400 Received: from plane.gmane.org ([80.91.229.3]:54361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUkk5-0005ta-He for emacs-orgmode@gnu.org; Mon, 31 Mar 2014 18:31:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WUkk1-000316-Mr for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 00:31:41 +0200 Received: from e178061157.adsl.alicedsl.de ([85.178.61.157]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Apr 2014 00:31:41 +0200 Received: from tjolitz by e178061157.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Apr 2014 00:31:41 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org RG Williams 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