lilypond-user
[Top][All Lists]
Advanced

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

Re: Hook like \AtEndDocument


From: Jan-Peter Voigt
Subject: Re: Hook like \AtEndDocument
Date: Tue, 03 Dec 2013 11:41:13 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Hi Urs,

Am 03.12.2013 11:12, schrieb Urs Liska:
> OK, trying to digest this.
> Do I get this  right when I say:
> 
> - write a function "annotate" to be used in the main input file.
>   This function saves some information (say location plus a comment) to
> an internal
>   structure that is defined public.
yes

> - use this function in the input files to annotate items in the score
yes

> - write another function "process-annotations".
>   This function uses the technique described in the snippet to make a new
>   score from itself which will then be processed after the current score
> has been finished.
>   This new score contains a function that can read the data from the
> previously defined
>   data structure from the original "annotate" function.
this would be an engraver placed in the score context, that does this
processing inside the finalize slot.

If you look in "edition.scm" lines 480 following in my lalily project,
you find an annotation engraver, that does it this way. There is a music
function \todo "<short>" "<description>" that inserts the annotation in
the music as a TextScript with an annotation properties, which is
fetched by the engraver.
At the bottom of the file, you can place
\markuplist \annolist
to display the annotations in the pdf.
And there is also a "*-todo.log" file created.
Just a this-is-how-I-didit ;)

Best, Jan-Peter




reply via email to

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