[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [BUG] New exporter exports TOC twice
From: |
Carsten Dominik |
Subject: |
Re: [O] [BUG] New exporter exports TOC twice |
Date: |
Sat, 27 Apr 2013 10:44:31 +0200 |
On 24.4.2013, at 13:50, Nicolas Goaziou <address@hidden> wrote:
> Hello,
>
> Thorsten Jolitz <address@hidden> writes:
>
>> Exporting a Worg file with this header (#+TOC: headlines 2)
>>
>> ,-----------------------------------------------------------------------------------------
>> | #+OPTIONS: H:3 num:nil \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t
>> | skip:nil d:(HIDE) tags:not-in-toc
>> | #+TOC: headlines 2
>> | #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
>> hideblocks
>> | #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
>> | #+TAGS: Write(w) Update(u) Fix(f) Check(c) noexport(n)
>> | #+TITLE: Header arguments and result types in Org Babel
>> | #+AUTHOR: Thorsten Jolitz, Eric Schulte
>> | #+EMAIL: tj[at]data-driven[dot]de
>> | #+LANGUAGE: en
>> | #+LINK_UP: index.php
>> | #+LINK_HOME: http://orgmode.org/worg/
>> | #+EXPORT_EXCLUDE_TAGS: noexport
>> |
>> | For a complete header argument reference see the Org-mode manual's page
>> | which lists all
>> |
>> [[http://orgmode.org/manual/Specific-header-arguments.html][Specific-header-arguments]].
>> | This page holds ancillary notes and tricks which have not made it into
>> | the manual.
>> |
>> | * Generally use =verbatim= when using =drawer=, =raw= or =org=
>> | We often want to add =verbatim= (which inhibits interpretation as a
>> | value, which can often result in a list or table result), when
>> | inserting results directly into the buffer using =drawer=, =raw= or
>> | =org= which don't do tabular interpretation. [...]
>> `-----------------------------------------------------------------------------------------
>>
>> exports the TOC twice in HTML export and ASCII export.
>
> If you don't specify a toc item in the OPTIONS line, Org will use the
> value of `org-export-with-toc', which is non-nil by default.
>
> So, your example is equivalent to:
>
> #+OPTIONS: toc:t
> #+TOC: headline 2
>
> Hence you get two tables of contents.
Hmm, I understand the reasoning here - but my feeling says that
the presence of one or more #+TOC lines in a file should probably
overrule both #+OPTIONS: toc: and the content of org-export-with-toc.
So in that case, your would then only get one TOC, at the
location of that line.
What do you think? Are there good reasons for not doing it
as I propose?
- Carsten