[Top][All Lists]

[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
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 = #note-id

to this:

\override = #note-id

which is not an alist.
Moreover, in the code I'm using 
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

\override = #'((id . "foo"))

I get the error:

Unsupported SCM value for format: ((id . foo))

So what should be set to - can it take a procedure
as id could in 2.18?

Richard Shann

reply via email to

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