* How to include section in exported Latex file, but not in table of contents
@ 2012-01-13 11:41 Viktor Rosenfeld
2012-01-16 12:01 ` Eric S Fraga
0 siblings, 1 reply; 3+ messages in thread
From: Viktor Rosenfeld @ 2012-01-13 11:41 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to include section in exported Latex file, but not in table of contents
2012-01-13 11:41 How to include section in exported Latex file, but not in table of contents Viktor Rosenfeld
@ 2012-01-16 12:01 ` Eric S Fraga
2012-01-16 22:21 ` Viktor Rosenfeld
0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2012-01-16 12:01 UTC (permalink / raw)
To: emacs-orgmode
Viktor Rosenfeld <rosenfel@informatik.hu-berlin.de> 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.
HTH,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.136.ge2707)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to include section in exported Latex file, but not in table of contents
2012-01-16 12:01 ` Eric S Fraga
@ 2012-01-16 22:21 ` Viktor Rosenfeld
0 siblings, 0 replies; 3+ messages in thread
From: Viktor Rosenfeld @ 2012-01-16 22:21 UTC (permalink / raw)
To: emacs-orgmode
Hi Eric,
Eric S Fraga wrote:
> Viktor Rosenfeld <rosenfel@informatik.hu-berlin.de> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-16 22:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 11:41 How to include section in exported Latex file, but not in table of contents Viktor Rosenfeld
2012-01-16 12:01 ` Eric S Fraga
2012-01-16 22:21 ` Viktor Rosenfeld
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).