Originally created by: *anonymous
Originally created by: pkx1...@gmail.com
Originally owned by: PhilEHol...@googlemail.com
On 08/08/15 09:53, Heikki Tauriainen wrote:> Hi,
>
> While examining the source code on how \header blocks are used to
> extract information for PDF metadata (to implement the enhancement
> #4539), I discovered that LilyPond actually supports quite an extensive
> (optional) mechanism for customizing PDF metadata independently of the
> information usually specified in the fields (title, subtitle, composer
> etc.) of a \header block, through the use of extra \header fields.
> However, I can't find any mention of this customization mechanism, nor
> examples of using any of the extra fields, in any of the current
> (v2.19.24) manuals. (The most relevant piece of documentation about
> the supported \header fields that I could find is the "Default layout
> of bookpart and score titles" example in Section 3.2.1 of the Notation
> Reference (v2.19.24) – this example claims to list "all" of the
> available fields.)
>
> I'd consider documenting the extra fields which can be used to
> customize the metadata specifically for PDF files a useful addition to
> the manuals. Knowledge about the possibility of customizing the
> metadata could be useful in the case where the fields of a \header
> block contain complex LilyPond markup code, which doesn't translate
> into plain text form in a "satisfactory" way automatically.
>
> In short, the implementation appears to support a number of extra
> \header fields which can be used (if defined in a \header block) to
> override the values of the fields listed in the documentation
> specifically for PDF output. For example, the "pdftitle" \header field
> appears to be available for specifying a title for the PDF metadata
> independently of the value of the "title" field (which is normally used
> to generate a title for the PDF metadata if there's no "pdftitle"
> override present), for example, as
>
> \header {
> title = "Title"
> pdftitle = "PDF Title"
> }
>
> (The title from the PDF metadata may be shown in a special way to the
> user by the PDF viewer application: for example, evince 3.16.1 will use
> the PDF title as the primary window title.)
>
> Quick experimenting suggests that the value for "pdftitle" appears to
> be first sought from a \book header, and then from a top-level \header,
> although I didn't try to cover all the possible cases of nesting
> various \header blocks. (Overriding the "pdftitle" field in \bookpart
> or \score headers doesn't seem to have any effect, which seems
> reasonable since book parts and scores don't map into separate PDF
> files.)
>
> The full list of fields which appear to be supported for customizing
> PDF metadata is defined in the "handle-metadata" function in
> scm/framework-ps.scm as lines of the form
>
> (metadata-lookup-output 'pdftitle 'title "Title")
>
> where the first argument to "metadata-lookup-output" looks like the
> \header field name that can be used to customize the value of the
> \header field given in the second argument specifically for PDF output.
>
> ----
>
> As I've modeled the \header field queries for enhancement [#4539]
> albeit in a
> reduced form, after the functionality which was already available for
> PDF output, [#4539] (if it gets accepted) will add a new extra \header
> field "midititle" which can be used to override the name of a MIDI
> sequence (which will, similar to PDF output, get its name from the
> "title" field after [#4539] if no override is present) for MIDI output.
> The "midititle" override will have significance in \header blocks down
> to the "score" level because each score with a \midi block will produce
> a separate MIDI file.
>
> Regards,
> Heikki Tauriainen
Originally posted by: PhilEHol...@googlemail.com
I've had a look at the source, and I think the list below is a full list of the header fields that have any effect on the output. Keywords and subject are a little odd, since they do not feature in the visible output (e.g. PDF or PNG) but only in the metadata, and are effectively simple synonyms for pdfsubject and pdfkeywords. I propose adding a new section "PDF metadata" before the "3.2.3 Creating footnotes" section of the NR.
\version "2.19.23"
\header {
dedication = "Dedication"
title = "Title"
subtitle = "Subtitle"
subsubtitle = "Subsubtitle"
instrument = "Instrument"
poet = "Poet"
composer = "Composer"
meter = "Meter"
arranger = "Arranger"
tagline = "tagline goes at the bottom of the last page"
copyright = "copyright goes at the bottom of the first page"
keywords = "Keywords"
subject = "Subject"
pdfcomposer = "pdfComposer"
pdftitle = "pdfTitle"
pdfsubject = "pdfSubject"
pdfkeywords = "pdfKeywords"
pdfmodDate = "D:20150811160000+01'00'"
pdfsubtitle = "pdfSubtitle"
pdfarranger = "pdfArranger"
pdfpoet = "pdfPoet"
pdfcopyright = "pdfCopyright"
}
\score {
\header {
piece = "Piece 1"
opus = "Opus 1"}
{ c1 \pageBreak c1 }
}
Originally posted by: PhilEHol...@googlemail.com
https://codereview.appspot.com/256480043/
(Passes make doc on my system)
Labels: Patch-new
Originally posted by: pkx1...@gmail.com
(No comment was entered for this change.)
Owner: PhilEHol...@googlemail.com
Originally posted by: pkx1...@gmail.com
Passes make, make check and a full make doc.
Labels: -Patch-new Patch-review
Originally posted by: pkx1...@gmail.com
There are some comments from Heikki T. on Rietveld, I am leaving this on review.
Originally posted by: pkx1...@gmail.com
Setting to Needs_work
Labels: -Patch-review Patch-needs_work
Diff:
Diff:
Diff:
Updated patch at https://codereview.appspot.com/256480043/
Passes make, make check and a full make doc.
Patch on countdown for October 2nd.
Patch counted down - please push
Pushed to staging as:
a22f2ad68fccb81e52f805ba69cb8c0e6bf8cd82