From: Nicolas Sceaux Date: Mon, 26 Apr 2004 21:45:57 +0000 (+0000) Subject: Explanation for #{ ... #} syntax. X-Git-Tag: release/2.3.1~47 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e2c0660507d221f1d1b70317a3424259186a1bf6;p=lilypond.git Explanation for #{ ... #} syntax. --- diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 6f9b0db3d0..5c82d2aa1e 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -8,6 +8,29 @@ @itemize @bullet +@item LilyPond expressions can be embedded into Scheme, thanks to the +@code{#@{ ... #@}} syntax. Within such a block, Scheme forms, for +instance variable names, can be introduced thanks to a @code{$} +character (@code{$$} has to be used to issue a single `$' character). +These forms are then 'printed' in the pattern, as if they were called +by (display). + +@example +#(define (textoffset dx dy) + (ly:export + #@{ \override Voice.TextScript #'extra-offset = #(cons $dx $dy) #@})) + +\score @{ + \notes @{ + c'^"normal text" + %% the following statement is the same as + %% \override Voice.TextScript #'extra-offset = #(cons 2 -3) + #(textoffset 2 -3) + c'^"text with offset" + @} +@} +@end example + @c FIXME: un-geekify @item Music lists are allowed at toplevel, and are handled by @code{default-toplevel-music-handler}. Similarly, a @code{score} block