From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-e-html and table of contents Date: Thu, 23 Aug 2012 13:52:43 -0400 Message-ID: <3161.1345744363@alphaville> References: <87d32h63lg.fsf@gmx.com> <11332.1345737403@alphaville> <871uix5znw.fsf@gmx.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4baI-0001K3-Fj for emacs-orgmode@gnu.org; Thu, 23 Aug 2012 13:52:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4baH-000050-FX for emacs-orgmode@gnu.org; Thu, 23 Aug 2012 13:52:46 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:31453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4baH-0008WV-8u for emacs-orgmode@gnu.org; Thu, 23 Aug 2012 13:52:45 -0400 In-Reply-To: Message from Eric Schulte of "Thu, 23 Aug 2012 10:41:23 MDT." <871uix5znw.fsf@gmx.com> 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: Eric Schulte Cc: Org Mode Mailing List Eric Schulte wrote: > Nick Dokos writes: > > > Eric Schulte wrote: > > > >> Hi, > >> > >> I've been using the new html exporter (org-e-html) recently, and I'm > >> surprised that it does not add tables of contents by default. Is there > >> a user variable which I can customize to change this default? Currently > >> the only way I see to add a table of contents is to add a TOC keyword to > >> the buffer. > >> > > > > org-export-with-toc perhaps? > > > > Nick > > > > Nope, > > With this variable set to t the e-html backend does *not* produce a > table of contents. To demonstrate, run the following from the command > line with the attached Org-mode file (although any file will do) saved > to /tmp/example.org. > > # -*- shell-script -*- > emacs --batch -l path/to/org-mode/lisp/org-element.el \ > -l path/to/org-mode/contrib/lisp/org-export.el \ > -l path/to/org-mode/contrib/lisp/org-e-html.el \ > /tmp/example.org \ > --eval '(let ((org-export-with-toc t)) (org-export-to-file (quote e-html) "/tmp/example.html"))' Try setting it to 4: org-e-html.el says (around line 1475) --8<---------------cut here---------------start------------->8--- ;; table of contents (let ((depth (plist-get info :with-toc))) (when (wholenump depth) (org-e-html-toc depth info))) --8<---------------cut here---------------end--------------->8--- even though that contradicts the docstring for the variable. Nick