lilypond-devel
[Top][All Lists]
Advanced

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

Re: Writing out a table of contents to a file


From: Reinhold Kainhofer
Subject: Re: Writing out a table of contents to a file
Date: Sun, 12 Apr 2009 11:35:04 +0200
User-agent: KMail/1.11.2 (Linux/2.6.27-11-generic; KDE/4.2.2; i686; ; )

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Samstag, 11. April 2009 11:55:53 Nicolas Sceaux wrote:
> Le 11 avr. 09 à 00:01, Reinhold Kainhofer a écrit :
> > [...]
> > However, I would rather get the page information into latex's TOC
> > instead and
> > for this I need to write out the TOC entries to a separate file,
> > preferrably
> > in the form
> >    page-number, "section", 1, title, toc-label
> > for each entry (since the addtotoc argument for the includepdf latex
> > command
> > expects exactly such a list).
> >
> > Now, it seems that I am unable to find a proper place where I have
> > access to
> > the TOC entries list with the page numbers properly determined and
> > available...
> >
> > Can anyone help me?
>
> Maybe this will help you doing what you want:
>
> \version "2.12.2"
>
> \paper {
>    #(set! write-page-layout #t)
>    #(define (page-post-process layout pages)

Ah, cool, that's exactly what I needed! Thanks a lot!
BTW, the set! call is not necessary, as page-post-process will always be 
called. It's just that the default implementation will check the write-page-
layout variable to see whether debug output should be printed out. If we 
override the page-post-process, the write-page-layout variable isn't used any 
more at all.

Okay, it works almost perfectly, except that I'm again unable to find out how 
get the lilypond input file (or rather the output filename) in Scheme... It 
must be trivial, but I seem to be blind.

Cheers,
Reinhold

- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJ4bXJTqjEwhXvPN0RAqTbAKClJAXiL33srqvL7+wmhEAGuhIQOgCffe98
JPtdWFP2qSG9SI/A7ysp4xE=
=82+j
-----END PGP SIGNATURE-----




reply via email to

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