[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PDF metadata missing if \header is within a \bookpart block
From: |
Thomas Morley |
Subject: |
Re: PDF metadata missing if \header is within a \bookpart block |
Date: |
Sun, 3 Jul 2016 21:36:07 +0200 |
2016-07-03 11:52 GMT+02:00 David Kastrup <address@hidden>:
> Federico Bruni <address@hidden> 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
- PDF metadata missing if \header is within a \bookpart block, Federico Bruni, 2016/07/03
- Re: PDF metadata missing if \header is within a \bookpart block, David Kastrup, 2016/07/03
- Re: PDF metadata missing if \header is within a \bookpart block, Federico Bruni, 2016/07/03
- Re: PDF metadata missing if \header is within a \bookpart block, Simon Albrecht, 2016/07/03
- Re: PDF metadata missing if \header is within a \bookpart block, Federico Bruni, 2016/07/14
- Re: PDF metadata missing if \header is within a \bookpart block, Federico Bruni, 2016/07/14
- Re: PDF metadata missing if \header is within a \bookpart block, David Kastrup, 2016/07/15
- Re: PDF metadata missing if \header is within a \bookpart block, Federico Bruni, 2016/07/15
- Re: PDF metadata missing if \header is within a \bookpart block, David Kastrup, 2016/07/15
Re: PDF metadata missing if \header is within a \bookpart block,
Thomas Morley <=
Re: PDF metadata missing if \header is within a \bookpart block, Federico Bruni, 2016/07/04