Nick Dokos <nicholas.do...@hp.com> writes:

> Eric Schulte <eric.schu...@gmx.com> 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"))'

#+Title: example file

* foo
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
hendrerit tempor tellus. Donec pretium posuere tellus. Proin quam
nisl, tincidunt et, mattis eget, convallis nec, purus. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus
mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non
turpis. Cras placerat accumsan nulla. Nullam rutrum. Nam vestibulum
accumsan nisl.

* bar
| one   | two  |
| three | four |

* baz
** sub one
- one
- two

** sub two
- three
- four
-- 
Eric Schulte
http://cs.unm.edu/~eschulte

Reply via email to