From 390eb7749f30e9acd3cdd0b0a7c881193deb29fd Mon Sep 17 00:00:00 2001 From: nsceaux Date: Mon, 26 Apr 2004 21:45:57 +0000 Subject: [PATCH] Explanation for #{ ... #} syntax. --- Documentation/topdocs/NEWS.texi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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 -- 2.39.5