From: fred Date: Tue, 26 Mar 2002 22:45:59 +0000 (+0000) Subject: lilypond-1.3.27 X-Git-Tag: release/1.5.59~1878 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=035b1431a09d74eef8ea71ee11d48316b5273172;p=lilypond.git lilypond-1.3.27 --- diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 4a5a95c7a2..1d222f5953 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -784,6 +784,33 @@ Usually this is used to switch staffs in Piano music, e.g. @end example +@cindex output properties + + +These allow you to tweak what is happening in the back-end +directly. If you want to control every detail of the output +formatting, this is the feature to use. The downside to this is that +you need to know exactly how the backend works. Example: + + +@mudela[fragment,verbatim] +\relative c'' { c4 + \context Staff \outputproperty + #(make-type-checker 'Note_head) + #'extra-offset = #'(5.0 . 7.5) + } +@end mudela + +This selects all note heads occurring at current staff level, and sets +the extra-offset of those heads to (5,7.5), shifting them up and +right. + +Use of this feature is entirely on your own risk: if you use this, the +result will depend very heavily on the implentation of the backend, +which we change unscrupulously. + + + @cindex commands diff --git a/VERSION b/VERSION index 87d3037b52..4e6268cb09 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=26 +PATCH_LEVEL=27 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/lily/parser.yy b/lily/parser.yy index a3a54d31f9..83669c3717 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -41,6 +41,7 @@ #include "mudela-version.hh" #include "grace-music.hh" #include "auto-change-music.hh" +#include "output-property.hh" // mmm Mudela_version oldest_version ("1.3.4"); @@ -111,7 +112,6 @@ of the parse stack onto the heap. */ Translator_group* trans; char c; int i; - int ii[10]; } %{ @@ -182,6 +182,7 @@ yylex (YYSTYPE *s, void * v_l) %token SPANREQUEST %token COMMANDSPANREQUEST %token TEMPO +%token OUTPUTPROPERTY %token TIME_T %token TIMES %token TRANSLATOR @@ -558,13 +559,13 @@ paper_def_body: if (!gh_symbol_p ($2)) THIS->parser_error ("expect a symbol as lvalue"); else - $$->default_properties_[$2] = $4; + $$->default_properties_.set ($2, $4); } | paper_def_body SCM_T '=' real semicolon { if (!gh_symbol_p ($2)) THIS->parser_error ("expect a symbol as lvalue"); else - $$->default_properties_[$2] = gh_double2scm ($4); + $$->default_properties_.set ($2, gh_double2scm ($4)); } | paper_def_body translator_spec_block { $$->assign_translator ($2); @@ -742,6 +743,20 @@ Simultaneous_music: Simple_music: request_chord { $$ = $1; } + | OUTPUTPROPERTY embedded_scm embedded_scm '=' embedded_scm { + SCM pred = $2; + if (!gh_symbol_p ($3)) + { + THIS->parser_error (_("Second argument must be a symbol")); + } + /*hould check # args */ + if (!gh_procedure_p (pred)) + { + THIS->parser_error (_("First argument must be a procedure taking 1 argument")); + } + + $$ = new Output_property (pred,$3, $5); + } | MUSIC_IDENTIFIER { $$ = $1->access_content_Music (true); } | property_def | translator_change