From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: Andreas Leha <andreas.leha@med.uni-goettingen.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: export to LaTeX with TOC but without numbers
Date: Tue, 4 Jun 2013 16:10:00 +0100 [thread overview]
Message-ID: <87txld29pz.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87a9n65bun.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Tue, 4 Jun 2013 13:55:44 +0200")
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
[...]
>> 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.
>
> Best,
> Andreas
Ah, I see. Well, you could do something along these lines (completely
untested and likely to be wrong...):
#+latex_header: \newcommand{\mysection}[1]{\section*{#1}\addcontentsline{toc}{section}{#1}}
and similar for subsection, subsubsection, ...
Then customise org-latex-classes and replace, for instance,
\\section*{%s} by \\mysection{%s}.
However, you'll probably need to put a bit more TeX in the
addcontentsline bit if you want some proper formatting (have a look at
latex.ltx [around line 5659 in my version of this file] to see how
content lines are handled by default...).
Not trivial but also not impossible!
I would suggest you look at latex-specific fora for answers to the more
general question of generating tables of contents for unnumbered
headings as I can imagine that there are simpler solutions.
HTH,
eric
--
: Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D
: in Emacs 24.3.50.1 and Org release_8.0.3-193-g334581
next prev parent reply other threads:[~2013-06-04 18:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 7:34 export to LaTeX with TOC but without numbers Andreas Leha
2013-06-04 11:47 ` Eric S Fraga
2013-06-04 11:55 ` Andreas Leha
2013-06-04 15:10 ` Eric S Fraga [this message]
2013-06-04 19:56 ` Andreas Leha
2013-06-05 1:00 ` Eric Abrahamsen
2013-06-05 7:14 ` Andreas Leha
2013-06-05 7:27 ` Eric S Fraga
2013-06-04 19:01 ` Nick Dokos
2013-06-04 20:10 ` Andreas Leha
2013-06-04 20:54 ` Nick Dokos
2013-06-05 7:09 ` Andreas Leha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87txld29pz.fsf@ucl.ac.uk \
--to=e.fraga@ucl.ac.uk \
--cc=andreas.leha@med.uni-goettingen.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).