lilypond-user
[Top][All Lists]
Advanced

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

Re: Hook like \AtEndDocument


From: Urs Liska
Subject: Re: Hook like \AtEndDocument
Date: Tue, 03 Dec 2013 11:49:40 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Am 03.12.2013 11:41, schrieb Jan-Peter Voigt:
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 ;)

Thank you very much for this.
I've had a little look into it and will have a hard time having a closer look ;-)

But I definitely have the impression I will have to go through much of this in order not to reinvent the wheel so many times (using wood instead of rubber ...)

Urs

Best, Jan-Peter


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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