From: hanwen Date: Fri, 16 Jan 2004 14:35:38 +0000 (+0000) Subject: * lily/lexer.ll: add empty markup signature. X-Git-Tag: release/2.1.10~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=288d0ef587805de7571765c06631e570c4869aa3;p=lilypond.git * lily/lexer.ll: add empty markup signature. * scm/new-markup.scm (markup-functions-and-signatures): reinstate strut markup * lily/parser.yy (markup): MARKUP_HEAD_EMPTY * scm/define-translator-properties.scm: update melismata property doco. --- diff --git a/ChangeLog b/ChangeLog index a4aa798f51..a37fe0ef30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2004-01-16 Han-Wen Nienhuys + * lily/lexer.ll: add empty markup signature. + + * scm/new-markup.scm (markup-functions-and-signatures): reinstate + strut markup + + * lily/parser.yy (markup): MARKUP_HEAD_EMPTY + + * scm/define-translator-properties.scm: update melismata property + doco. + * lily/system.cc (output_lines): revert uniquify_list() patch, strange side effects seen. diff --git a/input/regression/ottava-broken.ly b/input/regression/ottava-broken.ly index 7ce44e8ef1..1b6b12afe5 100644 --- a/input/regression/ottava-broken.ly +++ b/input/regression/ottava-broken.ly @@ -16,9 +16,10 @@ line, and the horizontal line doesn't stick out." \notes\relative c''' \notes { a2 b #(set-octavation 1) - a2 b \break c a + a2 b \break c''1 \break + a #(set-octavation 0) - a b c a + g,,2 b c a } } diff --git a/lily/lexer.ll b/lily/lexer.ll index cd6d840329..e419aaaeed 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -484,6 +484,8 @@ HYPHEN -- SCM tag = gh_cdr(s); if (tag == ly_symbol2scm("markup0")) return MARKUP_HEAD_MARKUP0; + if (tag == ly_symbol2scm("empty")) + return MARKUP_HEAD_EMPTY; else if (tag == ly_symbol2scm ("markup0-markup1")) return MARKUP_HEAD_MARKUP0_MARKUP1; else if (tag == ly_symbol2scm ("markup-list0")) diff --git a/lily/parser.yy b/lily/parser.yy index 077578e4b3..86a1dbf40b 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -344,6 +344,7 @@ yylex (YYSTYPE *s, void * v) %token MARKUP %token MARKUP_HEAD_MARKUP0 +%token MARKUP_HEAD_EMPTY %token MARKUP_HEAD_MARKUP0_MARKUP1 %token MARKUP_HEAD_SCM0 %token MARKUP_HEAD_SCM0_MARKUP1 @@ -2222,6 +2223,9 @@ markup: STRING { $$ = make_simple_markup ($1); } + | MARKUP_HEAD_EMPTY { + $$ = scm_list_n ($1, SCM_UNDEFINED); + } | MARKUP_HEAD_MARKUP0 markup { $$ = scm_list_n ($1, $2, SCM_UNDEFINED); } diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 2055fcbaec..cf45e53914 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1085,6 +1085,7 @@ (text-repeat-if-broken . #t) (shorten-pair . (0.0 . -0.6)) (staff-padding . 1.0) + (padding . 1.0) (enclose-bounds . #t) (width-correct . 0.0) (style . dashed-line) diff --git a/scm/define-translator-properties.scm b/scm/define-translator-properties.scm index 852be930a2..1f46f5df73 100644 --- a/scm/define-translator-properties.scm +++ b/scm/define-translator-properties.scm @@ -116,7 +116,7 @@ true then reset measurePosition when finding a barcheck. Turn off when using barchecks in polyphonic music.") (translator-property-description 'barNumberVisibility procedure? "Procedure that takes an int and returns whether the corresponding bar number should be printed") (translator-property-description 'bassFigureFormatFunction procedure? "DOCME") -(translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set") +(translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is present.") (translator-property-description 'beatLength ly:moment? "The length of one beat in this time signature.") (translator-property-description 'beatGrouping list? "List of beatgroups. Eg. in 5/8 time #(list 2 3).") @@ -315,8 +315,14 @@ the start of the music. whether a melisma is active. This can be used to signal melismas on top of those automatically detected. ") (translator-property-description 'melismaBusyProperties list? - "List of properties (symbols) to -determine whether a melisma is playing.") + "List of properties (symbols) to +determine whether a melisma is playing. Setting this property will +influence how lyrics are aligned to notes. For example, if set to +@code{#'(melismaBusy beamMelismaBusy)}, only manual melismata +(i.e. setting @code{melismaBusy} to @code{#t}) and manual beams are +considered. Possible values include @code{melismaBusy}, +@code{slurMelismaBusy}, @code{tieMelismaBusy}, and +@code{beamMelismaBusy}") (translator-property-description 'metronomeMarkFormatter procedure? @@ -390,7 +396,7 @@ r1 r1*3 R1*3 \\\\property Score.skipBars= ##t r1*3 R1*3 "When true, all no typesetting is done at this moment, causing the interpretation phase to go a lot faster. This can help with debugging large scores.") -(translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set.") +(translator-property-description 'slurMelismaBusy boolean? "Signal if a slur is present.") (translator-property-description 'solo boolean? "set if solo is detected by the part combiner.") (translator-property-description 'soloADue boolean? "set Solo/A due texts in the part combiner?.") (translator-property-description 'soloIIText string? "text for begin of solo for voice ``two'' when part-combining.") @@ -419,9 +425,11 @@ positions - by only drawing one beam over the beat.") "Function formatting a tab notehead; it takes a string number, a list of string tunings and Pitch object. It returns the text as a string.") -(translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set.") -(translator-property-description 'timeSignatureFraction number-pair? " -pair of numbers, signifying the time signature. For example #'(4 . 4) is a 4/4time signature.") +(translator-property-description 'tieMelismaBusy boolean? "Signal whether a tie is present.") +(translator-property-description 'timeSignatureFraction number-pair? +"pair of numbers, signifying the time signature. For example #'(4 . 4) +is a 4/4 time signature.") + (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc? Switch off for cadenzas.") (translator-property-description 'tonic ly:pitch? diff --git a/scm/new-markup.scm b/scm/new-markup.scm index 3c2c55b4a8..ff0dce1253 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -452,7 +452,6 @@ any sort of property supported by @ref{font-interface} and )) -;; TODO: fix this . (define-public (strut-markup paper props . rest) "Syntax: \\strut @@ -462,7 +461,7 @@ any sort of property supported by @ref{font-interface} and (let* ((m (Text_item::interpret_markup paper props " "))) - (ly:molecule-set-extent! m 0 '(1000 . -1000)) + (ly:molecule-set-extent! m X '(1000 . -1000)) m)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -470,43 +469,40 @@ any sort of property supported by @ref{font-interface} and (define (markup-signature-to-keyword sig) " (A B C) -> a0-b1-c2 " - - (let* ((count 0)) - (string->symbol (string-join - - (map - (lambda (func) - (set! count (+ count 1)) - (string-append - - ;; for reasons I don't get, - ;; (case func ((markup?) .. ) - ;; doesn't work. - (cond - ((eq? func markup?) "markup") - ((eq? func markup-list?) "markup-list") - (else "scheme") - ) - (number->string (- count 1)) - )) - - sig) - "-")) - - )) + (if (equal? sig '()) + 'empty + (let* ((count 0)) + (string->symbol (string-join + + (map + (lambda (func) + (set! count (+ count 1)) + (string-append + + ;; for reasons I don't get, + ;; (case func ((markup?) .. ) + ;; doesn't work. + (cond + ((eq? func markup?) "markup") + ((eq? func markup-list?) "markup-list") + (else "scheme") + ) + (number->string (- count 1)) + )) + + sig) + "-")) + ))) (define (markup-function? x) - (object-property x 'markup-signature) - ) + (object-property x 'markup-signature) ) (define (markup-list? arg) (define (markup-list-inner? l) (if (null? l) #t - (and (markup? (car l)) (markup-list-inner? (cdr l))) - ) - ) + (and (markup? (car l)) (markup-list-inner? (cdr l))) ) ) (and (list? arg) (markup-list-inner? arg))) (define (markup-argument-list? signature arguments) @@ -637,6 +633,7 @@ any sort of property supported by @ref{font-interface} and (cons fontsize-markup (list number? markup?)) (cons box-markup (list markup?)) + (cons strut-markup '()) ))