From: hanwen Date: Thu, 17 Jul 2003 17:27:15 +0000 (+0000) Subject: * scm/define-music-properties.scm (figure): use string for 'figure X-Git-Tag: release/1.7.25~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=282327de1635c756b250a89d7110be2025170363;p=lilypond.git * scm/define-music-properties.scm (figure): use string for 'figure * lily/parser.yy (bass_number): allow strings for bassfigure too. * scm/bass-figure.scm (make-bass-figure-markup): add alignBassFigureAccidentals property. --- diff --git a/ChangeLog b/ChangeLog index eb2f04da45..57ae8216a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2003-07-17 Han-Wen Nienhuys + * scm/define-music-properties.scm (figure): use string for 'figure + + * lily/parser.yy (bass_number): allow strings for bassfigure too. + + * input/regression/ : add raggedright = ##t where applicable. + * scm/bass-figure.scm (make-bass-figure-markup): add alignBassFigureAccidentals property. diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index b84854339a..eee67cf14e 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -645,7 +645,7 @@ a8-[ ais-] d-[ es r d-] @menu * Combining music into compound expressions:: * Adding articulation marks to notes :: -* More basic rhythms:: +* Basic rhythmical commands:: * Commenting input files:: @end menu diff --git a/input/regression/new-markup-syntax.ly b/input/regression/new-markup-syntax.ly index 4087dc57d9..c4dc84c7f1 100644 --- a/input/regression/new-markup-syntax.ly +++ b/input/regression/new-markup-syntax.ly @@ -23,7 +23,7 @@ texidoc = "New markup syntax." \musicglyph #"accidentals--1" \combine "X" "+" \combine "o" "/" - +% \char-number #"abc1234abc" \box \column << { "string 1" } { "string 2" } >> "$\\emptyset$" \italic Norsk diff --git a/lily/parser.yy b/lily/parser.yy index 3f740e4d65..5cb1441daf 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -49,6 +49,8 @@ TODO: #include #include + + #include "translator-def.hh" #include "lily-guile.hh" #include "misc.hh" @@ -285,8 +287,8 @@ yylex (YYSTYPE *s, void * v) %token FIGURE_SPACE %type exclamations questions dots optional_rest -%type bass_number bass_mod -%type br_bass_figure bass_figure figure_list figure_spec +%type bass_mod +%type bass_number br_bass_figure bass_figure figure_list figure_spec %token DIGIT %token NOTENAME_PITCH %token TONICNAME_PITCH @@ -1859,8 +1861,13 @@ tremolo_type: BASS FIGURES *****************************************************************/ bass_number: - DIGIT - | UNSIGNED + DIGIT { + $$ = scm_number_to_string (gh_int2scm ($1), gh_int2scm (10)); + } + | UNSIGNED { + $$ = scm_number_to_string (gh_int2scm ($1), gh_int2scm (10)); + } + | STRING { $$ = $1 } ; bass_mod: @@ -1879,7 +1886,7 @@ bass_figure: Music *bfr = MY_MAKE_MUSIC("BassFigureEvent"); $$ = bfr->self_scm(); - bfr->set_mus_property ("figure", gh_int2scm ($1)); + bfr->set_mus_property ("figure", $1); scm_gc_unprotect_object ($$); } diff --git a/scm/bass-figure.scm b/scm/bass-figure.scm index b60a433eb4..136396187e 100644 --- a/scm/bass-figure.scm +++ b/scm/bass-figure.scm @@ -31,11 +31,11 @@ (acc (ly:get-mus-property fig-music 'alteration)) (acc-markup #f) (fig-markup - (if (number? fig) - (make-number-markup (number->string fig)) + (if (string? fig) + (make-simple-markup fig) (make-simple-markup (if align-accs " " "")) ))) - + (if (number? acc) (make-line-markup (list fig-markup (alteration->text-accidental-markup acc))) diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm index 83ff53bf4f..5b146f580d 100644 --- a/scm/define-music-properties.scm +++ b/scm/define-music-properties.scm @@ -85,7 +85,8 @@ starting grace notes.") translation property") (music-property-description 'what string? "What to change for auto-change. FIXME, naming") -(music-property-description 'figure number? "number for figured bass") +(music-property-description 'figure string? "a `figure' (which may be +a string) for figured bass") (music-property-description 'alteration number? "alteration for figured bass") (music-property-description 'bracket-start boolean? "start a bracket here. TODO: use span requests?") diff --git a/scm/new-markup.scm b/scm/new-markup.scm index a90a48eb30..f9587aa8a2 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -326,7 +326,6 @@ for the reader. (bracketify-molecule m Y th (* 2.5 th) th) )) - ;; todo: fix negative space (define (hspace-markup grob props . rest) "Syntax: \\hspace NUMBER." @@ -505,7 +504,8 @@ for the reader. ;; size (cons smaller-markup (list markup?)) (cons bigger-markup (list markup?)) - +; (cons char-number-markup (list string?)) + ;; (cons sub-markup (list markup?)) (cons normal-size-sub-markup (list markup?))