[Top][All Lists]

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

Writing out a table of contents to a file

From: Reinhold Kainhofer
Subject: Writing out a table of contents to a file
Date: Sat, 11 Apr 2009 00:01:28 +0200
User-agent: KMail/1.11.2 (Linux/2.6.27-11-generic; KDE/4.2.2; i686; ; )

I recently discovered that for full scores, it's easiest to write things like 
the preface in Latex and then merge together the PDFs. I discovered the 
pdfpages LaTeX package, which allows you to include whole PDF files page-wise, 
so I have one LaTeX document where I simply include the whole ~100 pages PDF 
produced by LilyPond. However, to automate the table of contents, I'd need 
some page information about where LilyPond places new pieces. 

Basically, for each headline, I add a TOC entry using 
#(toplevel-music-handler parser (add-toc-item! 'tocItemMarkup piecename))

in Lilypond, which adds the piece to the TOC. The TOC can then be printed in 
lilypond via:
\markuplines \table-of-contents 

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 

Can anyone help me?


Reinhold Kainhofer, address@hidden,
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 *, DVR: 0005886
 * LilyPond, Music typesetting,

reply via email to

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