Hi Paul,

thanks for this information.

This is indeed exactly what I was looking for and will make life easier for several things.

I think we'll be investigating the options in this year's GSoC project, maybe that will be helpful thinking about hierarchical stylesheets another way.


Am 17.05.2018 um 14:15 schrieb Paul Morris:
Hi Urs,

On 05/13/2018 02:02 PM, Urs Liska wrote:

1) for SVG output the objects would get the class assigned (along with an id). I don't have any idea yet how that is implemented, though. This will make it possible to work with CSS in a display environment.

You'll be glad to know this is already supported in 2.19.  Check out this grob property:

|output-attributes| (list)

   An alist of attributes for the grob, to be included in output files.
   When the SVG typesetting backend is used, the attributes are
   assigned to a group (<g>) containing all of the stencils that
   comprise a given grob. For example, |'((id . 123) (class . foo)
   (data-whatever . “bar”))| will produce |<g id=“123” class=“foo”
   data-whatever=“bar”> … </g>|. In the Postscript backend, where there
   is no way to group items, the setting of the output-attributes
   property will have no effect.

It's only documented in the internals reference.  I think it probably gives you what you need to do what you want?

I added this functionality to LilyPond awhile back while working on 'lilypond-html-live-score'.  (Would like to find more time to do more work with that, but...)  This code might be of interest: https://gitlab.com/sigmate/lilypond-html-live-score/blob/master/grob-inspector.ily

lilypond-devel mailing list

lilypond-devel mailing list

Reply via email to