From dcb079c1d99595b2bcaaf571cd5d0b7aadc67b65 Mon Sep 17 00:00:00 2001 From: Nicolas Sceaux Date: Tue, 30 Nov 2004 20:59:58 +0000 Subject: [PATCH] * lily/parser.yy (markup): in markups, { .. } without command before are also flattened, ie \line must be explicitely used. * Documentation/user/changing-defaults.itely: * Documentation/user/notation.itely: * input/wilhelmus.ly: * input/regression/instrument-name-markup.ly: * input/regression/markup-score.ly: * input/regression/new-markup-scheme.ly: * input/regression/new-markup-syntax.ly: * input/test/coriolan-margin.ly: use \line in markups where appropriate --- ChangeLog | 15 +++++++++++++++ Documentation/topdocs/NEWS.texi | 5 ++++- Documentation/user/changing-defaults.itely | 14 ++++++-------- Documentation/user/notation.itely | 22 +++++++++++----------- input/regression/instrument-name-markup.ly | 2 +- input/regression/markup-score.ly | 2 +- input/regression/new-markup-scheme.ly | 2 +- input/regression/new-markup-syntax.ly | 2 +- input/test/coriolan-margin.ly | 4 ++-- input/wilhelmus.ly | 2 +- lily/parser.yy | 22 +++++++++++++--------- 11 files changed, 56 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b14efbfcc..b95b2dc5c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-11-30 Nicolas Sceaux + + * lily/parser.yy (markup): in markups, { .. } without command + before are also flattened, ie \line must be explicitely used. + + * Documentation/user/changing-defaults.itely: + * Documentation/user/notation.itely: + * input/wilhelmus.ly: + * input/regression/instrument-name-markup.ly: + * input/regression/markup-score.ly: + * input/regression/new-markup-scheme.ly: + * input/regression/new-markup-syntax.ly: + * input/test/coriolan-margin.ly: use \line in markups where + appropriate + 2004-11-28 Nicolas Sceaux * scm/new-markup.scm (map-markup-command-list): helper function diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 68edfa400a..e39acda076 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -12,7 +12,10 @@ In markups, expressions stacked with @code{\column}, @code{\center-align}, etc, are not grouped with @code{< ... >} anymore, but with @code{@{ ... @}}, eg: @example -\markup \column @{ @{ first line @} @{ second line @} @} +\markup \column @{ + \line @{ first line @} + \line @{ second line @} +@} @end example @item diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index 54afeed982..e4c9e5a55c 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -1459,14 +1459,12 @@ For clarity, you can also do this for single arguments, e.g., In markup mode you can compose expressions, similar to mathematical -expressions, XML documents, and music expressions. The braces group -notes into horizontal lines. Other types of lists also exist: you can -stack expressions grouped vertically with -the command @code{\column}. Similarly, @code{\center-align} aligns -texts by their center lines: +expressions, XML documents, and music expressions. You can stack +expressions grouped vertically with the command @code{\column}. +Similarly, @code{\center-align} aligns texts by their center lines: @lilypond[quote,verbatim,fragment,relative=1] -c1^\markup { \column { a bbbb c } } +c1^\markup { \column { a bbbb \line { c d } } } c1^\markup { \center-align { a bbbb c } } c1^\markup { \line { a b c } } @end lilypond @@ -2212,10 +2210,10 @@ composer flush right on a single line. @verbatim \paper { bookTitleMarkup = \markup { - \fill-line < + \fill-line @{ \fromproperty #'header:title \fromproperty #'header:composer - > + @} } } @end verbatim diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index cfe0244059..d08c1e6748 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -5176,7 +5176,7 @@ names, for example @lilypond[quote,fragment,verbatim,raggedright] \set Staff.instrument = \markup { \column { "Clarinetti" - { "in B" \smaller \flat } } } + \line { "in B" \smaller \flat } } } c''1 @end lilypond @@ -5946,21 +5946,21 @@ select ancient accidentals. Supported styles are s^\markup { \column { "vaticana" - { " " \musicglyph #"accidentals-vaticana-1" - " " \musicglyph #"accidentals-vaticana0" } + \line { " " \musicglyph #"accidentals-vaticana-1" + " " \musicglyph #"accidentals-vaticana0" } } \column { "medicaea" - { " " \musicglyph #"accidentals-medicaea-1" } + \line { " " \musicglyph #"accidentals-medicaea-1" } } \column { "hufnagel" - { " " \musicglyph #"accidentals-hufnagel-1" } + \line { " " \musicglyph #"accidentals-hufnagel-1" } } \column { "mensural" - { " " \musicglyph #"accidentals-mensural-1" - " " \musicglyph #"accidentals-mensural1" } + \line { " " \musicglyph #"accidentals-mensural-1" + " " \musicglyph #"accidentals-mensural1" } } } } @@ -6460,19 +6460,19 @@ supported are @code{vaticana}, @code{medicaea}, @code{hufnagel}, and \new Lyrics \lyricmode { \markup { \column { \typewriter "vaticana" - { " " \musicglyph #"custodes-vaticana-u0" } + \line { " " \musicglyph #"custodes-vaticana-u0" } } } \markup { \column { \typewriter "medicaea" - { " " \musicglyph #"custodes-medicaea-u0" } + \line { " " \musicglyph #"custodes-medicaea-u0" } }} \markup { \column { \typewriter "hufnagel" - { " " \musicglyph #"custodes-hufnagel-u0" } + \line { " " \musicglyph #"custodes-hufnagel-u0" } }} \markup { \column { \typewriter "mensural" - { " " \musicglyph #"custodes-mensural-u0" } + \line { " " \musicglyph #"custodes-mensural-u0" } }} } @end lilypond diff --git a/input/regression/instrument-name-markup.ly b/input/regression/instrument-name-markup.ly index e32678dd63..1f6d819977 100644 --- a/input/regression/instrument-name-markup.ly +++ b/input/regression/instrument-name-markup.ly @@ -14,7 +14,7 @@ textFlat = \markup {\smaller \flat} \score { \new Staff { - \set Staff.instrument = \markup { \column { "Clarinetti" { "in B" \textFlat } } } + \set Staff.instrument = \markup { \column { "Clarinetti" \line { "in B" \textFlat } } } \set Staff.instr = \markup { \smaller { "Cl(B" \textFlat ")" } } { c''1 \break c'' } diff --git a/input/regression/markup-score.ly b/input/regression/markup-score.ly index 971c30850e..00eb4075c1 100644 --- a/input/regression/markup-score.ly +++ b/input/regression/markup-score.ly @@ -19,7 +19,7 @@ tuning = \markup { \header { title = "Solo Cello Suites" subtitle = "Suite IV" - subsubtitle = \markup { \fill-line { { "Originalstimmung: " \tuning } } } + subsubtitle = \markup { "Originalstimmung:" \tuning } } \relative { diff --git a/input/regression/new-markup-scheme.ly b/input/regression/new-markup-scheme.ly index 7f7aa3166f..6a4b96bbf1 100644 --- a/input/regression/new-markup-scheme.ly +++ b/input/regression/new-markup-scheme.ly @@ -23,7 +23,7 @@ \musicglyph #"accidentals--1" \combine "X" "+" \combine "o" "/" - \box \column { { "string 1" } { "string 2" } } + \box \column { \line { "string 1" } \line { "string 2" } } "$\\emptyset$" \italic Norsk \super "2" diff --git a/input/regression/new-markup-syntax.ly b/input/regression/new-markup-syntax.ly index 94c82ce122..3c1dace162 100644 --- a/input/regression/new-markup-syntax.ly +++ b/input/regression/new-markup-syntax.ly @@ -26,7 +26,7 @@ texidoc = "With the new markup syntax, text may be written in various manners." \combine "X" "+" \combine "o" "/" % \char-number #"abc1234abc" - \box \column { { "string 1" } { "string 2" } } + \box \column { \line { "string 1" } \line { "string 2" } } "$\\emptyset$" \italic Norsk \super "2" diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index a23da9e432..1551301c2e 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -42,7 +42,7 @@ oboi = \relative c' { } clarinetti = \relative c' { - \set Staff.instrument = \markup { \column { "Clarinetti" { "in B" \raisedFlat } } } + \set Staff.instrument = \markup { \column { "Clarinetti" \line { "in B" \raisedFlat } } } \set Staff.instr = \markup { \smaller { "Cl(B" \raisedFlat ")" } } c1 c @@ -55,7 +55,7 @@ fagotti = \relative c' { } corni = \relative c' { - \set Staff.instrument = \markup { \column { "Corni" { "in E" \raisedFlat } } } + \set Staff.instrument = \markup { \column { "Corni" \line { "in E" \raisedFlat } } } \set Staff.instr = \markup { \smaller { "Cor(E" \raisedFlat ")" } } c1 c diff --git a/input/wilhelmus.ly b/input/wilhelmus.ly index b1eaadaa6a..23b4892cd2 100644 --- a/input/wilhelmus.ly +++ b/input/wilhelmus.ly @@ -142,7 +142,7 @@ text = \lyricmode { oneHalfNoteTime = \markup { \override #'(baseline-skip . 0) - \column { { \number "1" } { \smaller \smaller \note #"2" #-0.5 } } + \column { \line { \number "1" } \line { \smaller \smaller \note #"2" #-0.5 } } } \layout { diff --git a/lily/parser.yy b/lily/parser.yy index 43670458d2..e85909b37d 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -444,7 +444,8 @@ or %type Generic_prefix_music_scm %type lyric_element %type Alternative_music -%type full_markup markup_composed_list markup_braced_list markup_braced_list_body markup_head_1_item markup_head_1_list markup simple_markup markup_top +%type full_markup markup_list markup_composed_list markup_braced_list markup_braced_list_body +%type markup_head_1_item markup_head_1_list markup simple_markup markup_top %type mode_changing_head %type mode_changing_head_with_context %type object_id_setting @@ -2480,7 +2481,7 @@ full_markup: ; markup_top: - markup_composed_list { + markup_list { $$ = scm_list_2 (ly_scheme_function ("line-markup"), $1); } | markup_head_1_list simple_markup { @@ -2489,8 +2490,14 @@ markup_top: | simple_markup { $$ = $1; } - | markup_braced_list { - $$ = scm_list_2 (ly_scheme_function ("line-markup"), $1); + ; + +markup_list: + markup_composed_list { + $$ = $1; + } + | markup_braced_list { + $$ = $1; } ; @@ -2512,7 +2519,7 @@ markup_braced_list_body: | markup_braced_list_body markup { $$ = scm_cons ($2, $1); } - | markup_braced_list_body markup_composed_list { + | markup_braced_list_body markup_list { $$ = scm_append_x (scm_list_2 (scm_reverse_x ($2, SCM_EOL), $1)); } ; @@ -2569,7 +2576,7 @@ simple_markup: | MARKUP_HEAD_EMPTY { $$ = scm_list_1 ($1); } - | MARKUP_HEAD_LIST0 markup_braced_list { + | MARKUP_HEAD_LIST0 markup_list { $$ = scm_list_2 ($1,$2); } | MARKUP_HEAD_MARKUP0_MARKUP1 markup markup { @@ -2584,9 +2591,6 @@ markup: | simple_markup { $$ = $1; } - | markup_braced_list { - $$ = scm_list_2 (ly_scheme_function ("line-markup"), $1); - } ; %% -- 2.39.5