emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] export to LaTeX with TOC but without numbers


From: Nick Dokos
Subject: Re: [O] export to LaTeX with TOC but without numbers
Date: Tue, 04 Jun 2013 15:01:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Andreas Leha <address@hidden> writes:

> Hi Eric,
>
> thanks for your answer.
>
> Eric S Fraga <address@hidden> writes:
>
>> Andreas Leha <address@hidden> writes:
>>
>>> Hi all,
>>>
>>> How can I export to LaTeX with the combined effect of toc:t and num:nil?
>>>
>>> Setting num:nil results in an empty TOC.
>>>
>>> I guess, I am looking for a way to automatically add
>>> #+begin_latex
>>>   \addcontentsline{toc}{<the level>}{<the heading>}
>>> #+end_latex
>>> to the exported document.
>>>
>>> Regards,
>>> Andreas
>>
>> Andreas,
>>
>> the problem is that setting num:nil tells org to use the second form of
>> sectioning, as specified in org-latex-classes.  The unnumbered section
>> headings do not generate TOC information so no TOC is available.  It's a
>> latex issue, not org.
>>
>> There are workarounds but they involve using latex directly (to add
>> entries to a TOC basically).
>
> I am aware of that.  Sorry for being unclear.  I would like to automate
> exactly that.
>
> I use several LaTeX export classes and I would like that possibility
> (TOC with unnumbered sections/subsections/...) in each of these classes.
> Thus, I am searching for a (more) general approach, that I could 'switch on'
> and have it insert the latex statement on its own.
>

Instead of adding toc entries, you can use latex to delete section
numbers:

--8<---------------cut here---------------start------------->8---
#+LATEX_HEADER: \setcounter{secnumdepth}{0}

* foo
This is foo.

** subfoo1
This is foo.1
** subfoo2
This is foo.2

* bar
This is bar.
--8<---------------cut here---------------end--------------->8---

The problem might be that the sections are not numbered in the TOC
either. But if you don't care about that, this is certainly simpler
than adding toc entries by hand.

-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]