From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: How to include section in exported Latex file, but not in table of contents Date: Mon, 16 Jan 2012 23:21:21 +0100 Message-ID: <20120116222121.GA2767@kenny.fritz.box> References: <20120113114157.GA2704@kenny.local> <87pqej7t6d.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmuvl-0007Ze-IH for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 17:21:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rmuvk-0004TJ-9H for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 17:21:33 -0500 Received: from mail-bk0-f41.google.com ([209.85.214.41]:44664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmuvj-0004Sf-UA for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 17:21:32 -0500 Received: by bkbzx1 with SMTP id zx1so140446bkb.0 for ; Mon, 16 Jan 2012 14:21:30 -0800 (PST) Content-Disposition: inline In-Reply-To: <87pqej7t6d.fsf@ucl.ac.uk> 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: emacs-orgmode@gnu.org Hi Eric, Eric S Fraga wrote: > Viktor Rosenfeld writes: > > > Hi, > > > > I would like to include an entry of my org file in the exported Latex > > file, but I would like the entry to be skipped in the table of contents. > > > > In other words, I would like to reproduce the behavior of Latex commands > > like \section* and so on. Is this at all possible? > > > > I tried EXPORT_OPTIONS: toc:nil in a property drawer below the entry, > > but that didn't work out. > > > > Thanks, > > Viktor > > AFAIK, I don't think this is possible as headlines are exported as > either \section or \section* depending on your num: setting for the > whole document. > > However, it *is* possible to do the opposite of what you want, albeit > with direct latex code. That is, you can have sections *not* included > in the table of contents automatically but have those that you want > included by adding an explicit =\addcontentsline= directive into your > org file. For example: > > --8<---------------cut here---------------start------------->8--- > #+OPTIONS: H:3 num:nil toc:t > > #+LaTeX: \tableofcontents > > * Introduction > This is some introductory text. > * Included in toc > #+LaTeX: \addcontentsline{toc}{section}{The actual entry in TOC} > This section heading should appear in the table of contents. > * Conclusions > But this will not appear in the toc. > --8<---------------cut here---------------end--------------->8--- > > Unfortunately, numbering is not done at all so you would have to do this > manually if you wanted numbers. Also note that the "toc:t" setting is > actually ignored as you have not asked for numbering... so you have to > explicitly ask for the table of contents yourself. Thanks for the info. I'll try it out, but it seems somewhat brittle, especially with a large toc. Cheers, Viktor