[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-e-html and table of contents
From: |
Nick Dokos |
Subject: |
Re: [O] org-e-html and table of contents |
Date: |
Thu, 23 Aug 2012 13:52:43 -0400 |
Eric Schulte <address@hidden> wrote:
> Nick Dokos <address@hidden> writes:
>
> > Eric Schulte <address@hidden> 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