Next: , Previous: Determining the grob property, Up: The \override command


9.2.6 Objects connected to the input

In some cases, it is possible to take a short-cut for tuning graphical objects. For objects that result directly from a piece of the input, you can use the \tweak function, for example

<
  c
  \tweak #'color #red d
  g
  \tweak #'duration-log #1  a
>4-\tweak #'padding #10 -. 

[image of music]

As you can see, properties are set directly in the objects directly, without mentioning the grob name or context where this should be applied.

This technique only works for objects that are directly connected to an event from the input, for example

It notably does not work for stems and accidentals (these are caused by note heads, not by music events), clefs (these are not caused by music inputs, but rather by the change of a property value).

In a similar vein, objects may be parenthesized by prefixing \parenthesize to the music event,

<
  c
  \parenthesize  d
  g
>4-\parenthesize -. 

[image of music]

This page is for LilyPond-2.8.0 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Other languages: English.
Using automatic language selection.