@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)
+<c8 e g> }
+@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
#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");
Translator_group* trans;
char c;
int i;
- int ii[10];
}
%{
%token SPANREQUEST
%token COMMANDSPANREQUEST
%token TEMPO
+%token OUTPUTPROPERTY
%token TIME_T
%token TIMES
%token TRANSLATOR
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);
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