[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
output-attributes in 2.20.0
From: |
Richard Shann |
Subject: |
output-attributes in 2.20.0 |
Date: |
Sun, 02 Aug 2020 13:06:46 +0100 |
I'm trying to get the annotated SVG output that enables playback with a
scrolling LilyPond score working in 2.20.
In the changes http://lilypond.org/doc/v2.20/Documentation/changes/inde
x.html I read:
"A new output-attributes grob property is now used for svg output
instead of the id grob property. It allows multiple attributes to be
defined as an association list. For example, #'((id . 123) (class .
foo) (data-whatever . “bar”)) will produce the following group tag in
an SVG file: <g id=“123” class=“foo” data-whatever=“bar”> … </g>"
but I see that the convert-ly changes this:
\override NoteHead.id = #note-id
to this:
\override Score.NoteHead.output-attributes.id = #note-id
which is not an alist.
Moreover, in the code I'm using
(http://git.savannah.gnu.org/gitweb/?p=denemo.git;a=blob;f=actions/lilypond/live-score.ily;h=5a9d22fe5efe89e9f63a087177d206eab63109f0;hb=HEAD)
note-id is a procedure returning a string, which seems to be acceptable to the
2.18 SVG generator while the 2.20 version gives an error message:
Unsupported SCM value for format: #<procedure note-id (grob)>
and the output in the SVG is an empty string:
<g id="">
while with 2.18
the output was (for example)
<g id="Note-7-2">
where "Note-7-2" is the return value for the particular grob - the line
7 column 2 location information.
What's more, if I write an alist value (following the documentation
above)
\override Score.NoteHead.output-attributes.id = #'((id . "foo"))
I get the error:
Unsupported SCM value for format: ((id . foo))
So what should output-attributes.id be set to - can it take a procedure
as id could in 2.18?
Richard Shann
- output-attributes in 2.20.0,
Richard Shann <=