lilypond-devel
[Top][All Lists]
Advanced

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

Re: \class grob property


From: Urs Liska
Subject: Re: \class grob property
Date: Thu, 17 May 2018 14:28:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

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.

Best
Urs


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

Cheers,
-Paul
_______________________________________________
lilypond-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-devel




reply via email to

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