2016-07-03 11:52 GMT+02:00 David Kastrup <d...@gnu.org>: > Federico Bruni <f...@inventati.org> writes: > >> If you compile the following snippet, you'll see no title metadata in >> the PDF: >> >> \version "2.19.43" >> >> \bookpart { >> \header { >> title = "Title" >> pdftitle = "PDF title" >> } >> { c1 } >> } >> >> This happens because \header is within a \bookpart block. If you move >> it outside \bookpart, the title appear in PDF metadata. >> >> It's a bug? I think so. LilyPond should check if there's a \header >> block in an higher level (\book); if there is no \header in a higher >> level, it should use the \header values within \bookpart. > > Which bookpart? There is one PDF per book, but several bookparts per > PDF. So it does not make sense to put per-PDF values, like the title > metadata is, in bookparts. > >> This is important to me because: >> >> 1. Most of my songs are wrapped in \bookpart blocks, because I can >> then make a book just including the files from a master \book file > > So why don't you then make a title for that master \book? How is > LilyPond to know which bookpart to take the title from? > >> 2. As a result of this bug, all my single songs in my LilyPond score >> collection are missing PDF metadata (so they appear as "untitled" in >> Gnome Documents, the application I use to quickly find my local PDF) > > I don't really see how LilyPond could sensibly behave other than that.
David, I agree with all you've said. Nevertheless, I tried a workaround for single bookparts with a build including issue 4908. (1) This works as expected: hdr = \header { title = "my-title" } %#(format #t "~y" (ly:module->alist hdr)) \header { \hdr } { r1 } $ exiftool file.pdf returns [...] Title : my-title Creator : LilyPond 2.19.45 (2) This one not: hdr = \header { title = "my-title" } bkprt = \bookpart { \header { \hdr } { r1 } } %#(format #t "~y" (ly:module->alist (ly:book-header bkprt))) \header { #(ly:book-header bkprt) } \bkprt $ exiftool file.pdf returns [...] Title : Untitled Creator : LilyPond 2.19.45 What's the essential difference? Cheers, Harm _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond