]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.130.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 21 Feb 2001 20:03:54 +0000 (21:03 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 21 Feb 2001 20:03:54 +0000 (21:03 +0100)
1.3.130.jcn1
============

* Bugfix: don't display repeat colons for zero height bar lines; fixes
repeat barlines in lyrics.

* Fixed markup definition and implementation, added baseline-skip
property; this makes multi-line markup text a lot easier.

* Bugfix: chordChanges works with other rhythm of accompaniment, and
silly chord name typo fixes.

1.3.130
=======

25 files changed:
CHANGES
Documentation/user/refman.itely
VERSION
input/regression/lyrics-bar.ly
input/star-spangled-banner.ly
input/test/lyrics-bar.ly
input/test/markup.ly
input/tutorial/orchestral-score.ly
lily/a2-engraver.cc
lily/bar.cc
lily/chord-name-engraver.cc
lily/include/text-item.hh
lily/text-item.cc
ly/engraver.ly
ly/property.ly
mutopia/Coriolan/bassi.ly
mutopia/Coriolan/clarinetti.ly
mutopia/Coriolan/corni.ly
mutopia/Coriolan/timpani.ly
mutopia/Coriolan/trombe.ly
scm/chord-name.scm
scm/font.scm
scm/grob-description.scm
scm/grob-property-description.scm
scm/interface-description.scm

diff --git a/CHANGES b/CHANGES
index 3f03f10d143a64ead04bf7af0f8432c9d7fef376..45130da12668c3f4c5b112608d2ce78038793721 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,17 @@
+1.3.130.jcn1
+============
+
+* Bugfix: don't display repeat colons for zero height bar lines; fixes
+repeat barlines in lyrics.
+
+* Fixed markup definition and implementation, added baseline-skip
+property; this makes multi-line markup text a lot easier.
+
+* Bugfix: chordChanges works with other rhythm of accompaniment, and
+silly chord name typo fixes.
+
+1.3.130
+=======
 
 1.3.129.jcn2
 ============
index 6161f908d4b97e30502b6a16efc9f5b161239c48..a5276db8cf4abf3b0bc61f0b2921ca702471f314 100644 (file)
@@ -14,8 +14,6 @@
 
    Rhythm staff (clef, x-notehead)
 
-   markup text
-
    postscript, scheme output?
 
    (links to?) using/existance of ly2dvi, lilypond-book
@@ -1175,14 +1173,15 @@ name of the corresponding symbol appearing underneath.
 @subsubsection Text scripts
 @cindex Text scripts
 
-FIXME: markup
-
-In addition, it is possible to place arbitrary strings of text or
-@TeX{} above or below notes by using a string instead of an
-identifier: @code{c^"text"}.  Fingerings 
-can be placed by simply using digits.  All of these note ornaments
-appear in the printed output but have no effect on the MIDI rendering of
-the music.
+In addition, it is possible to place arbitrary strings of text or markup
+text (see @ref{Text markup}) above or below notes by using a string
+instead of an identifier: @code{c^"text"}.  It is possible to use @TeX{}
+commands, but this should be avoided because this makes it impossible
+for LilyPond to compute the exact length of the string, which may lead
+to collisions.  Also, @TeX{} commands won't work with direct postscript
+output.  Fingerings can be placed by simply using digits.  All of these
+note ornaments appear in the printed output but have no effect on the
+MIDI rendering of the music.
 
 @c .    {Fingerings}
 @unnumberedsubsubsec Fingerings
@@ -3783,11 +3782,13 @@ Don't move the finger 2, only text "m.d." ...
 
 
 @menu
-* Text markup::                 
+* Text markup::
 @end menu
 
 @node Text markup
 @subsection Text markup
+@cindex text markup
+@cindex markup text
 
 LilyPond has an internal mechanism to typeset texts: you can
 form text markup expressions by composing scheme expressions
@@ -3806,16 +3807,112 @@ in the following way:
 Formally, Scheme markup text is defined as follows:
 
 @example
-text: string | (markup sentence)
-sentence: text | sentence text
-markup: property | abbrev | style
+text: string | (head? text+)
+head: markup | (markup+)
+markup-item: property | abbrev | @var{fontstyle}
 property: (@var{key} . @var{value})
 abbrev: @code{rows lines roman music bold italic named super sub text}
-style: @var{fontstyle}
 @end example
 
-The @var{key}-@var{value} pair is a grob property. [Why is this
-useful?]  The following abbreviations are currently defined:
+The markup is broken down and converted into a list of grob properties,
+which are prepended to the grop's property list.  The
+@var{key}-@var{value} pair is a grob property.
+@ignore
+[Why is this useful?]
+
+?Snapnie: markup text is eerste item dat voldoet aan mijn gewelfdige,
+ideale idee van direct-en-eenmalig-per-item te zetten properties, ipv
+gehaspel via \property en hopen dat je property (enkel) in juiste item
+terecht gaat komen.  Heb je deze wel bewust meegemaakt:
+
+Sender: jan@appel.lilypond.org
+To: Han-Wen <hanwen@cs.uu.nl>   
+Subject: (elt) properties
+Organization: Jan at Appel
+From: janneke@gnu.org
+Date: 01 Nov 2000 10:39:10 +0100
+Message-ID: <m3og00av5t.fsf@appel.lilypond.org>
+User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Lines: 77
+Xref: appel.lilypond.org vers:1991
+
+Hi,
+
+Wat ik vooral mis, is een koele manier om een propertie eenmalig aan
+een element te hangen.  Hoop dat je zinvol over wilt meedenken; zie
+het monster van les-nereides.  Misschien dat we 't niet moeten doen
+voor 1.4 maar wachten tot properties nog wat verder
+uitgekristalliseerd zijn?
+
+Nu moet je
+
+   \property Voice.Stem \push #'length = #'6
+   a
+   \property Voice.Stem \pop #'length
+   b
+
+waarmee je in feite zeg tegen de stem-engraver: vanaf nu aan moet je
+alle stems 6 lang maken (maakt stem); onee, doe maar weer default
+lengte.
+
+Maar dat is eigenlijk niet wat je bedoelt, wat je zou willen is net
+zo'n directe interface als wat we nu hebben voor markup text, bv. iets
+van:
+
+   a+#'(Stem::length . 6) b
+
+Bij markup text kun je direct en eenmalig een reeks properties aan een
+enkel item toevoegen; iets wat je volgens mij vaak nodig hebt.
+
+Ik zat eerst te denken aan ``request properties'': properties
+toevoegen aan request, die dan worden doorgegeven aan alle items die
+door dat request worden gemaakt.
+
+Maar misschien zuigt dat wel te vreselijk en moeten we iets van
+``volatile'' properties maken.
+
+Btw,
+
+    \property Voice.Slur \push #'dash = #1
+    \property Voice.Slur \pop #'dash
+    a()b
+    \property Voice.Slur \push #'direction = #-1
+    \property Voice.Slur \pop #'direction
+    ()c
+
+of de kluts waar ik brr van word, eigenlijk ook alleen doenbaar is
+voor wat veelgebruikte properties:
+
+    slurDotted = \property Voice.Slur \push #'dash = #1
+    slurNoDots = \property Voice.Slur \pop #'dash
+    slurUp = \property Voice.Slur \push #'direction = #1
+    slurDown = \property Voice.Slur \push #'direction = #-1
+    slurBoth = \property Voice.Slur \pop #'direction
+
+    [..]
+
+    \slurDotted\slurDown
+    a()b
+    ()c
+    \slurNoDots\slurBoth
+
+zou toch graag meer iets in trant van, als je begrijpt wat ik bedoel
+
+    Slur+#'((dash . 1) (direction . 1))
+    b () c
+    Slur-#'(dash direction)
+
+ofwel
+
+    a(+#'((dash . 1) (direction . 1))
+    )b(+#'((dash . 1) (direction . 1))
+    )c
+@end ignore
+
+The following abbreviations are currently
+defined:
 
 @table @code
 @item rows
@@ -3844,10 +3941,10 @@ horizontal mode: set all text on one line (default)
 @var{fontstyle} may be any of @code{finger volta timesig mmrest mark
 script large Large dynamic}
 
-
+@ignore
 [kern, raise ??]
-
-[I still think that the semantics are weird, but well]
+Wat is daarmee, zijn toch gewoon grob properties van text-interface?
+@end ignore
 
 @c .{Local emacs vars}
 @c Local variables:
diff --git a/VERSION b/VERSION
index 2946fc3906ad199985c128de0914ccf6662495f6..dd6bf674402098daf0ce22f5910942661386393c 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=130
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index ec0309b3221556affad21dda2e0a2252dc9aef45..58b6abea2d22ab426c926107aa457b0e4038302a 100644 (file)
@@ -8,15 +8,15 @@ lyrics don't collide with barlines.
 \score {
        \context StaffGroup <
        \notes \context Staff {
-               b1 b1 \bar "|.";
+               b1 \bar "|:"; b1 \bar ":|";
        }
        \lyrics\context Lyrics <
                \context LyricsVoiceWithBars {
-%                      thisContextHasSpanBarEngraver1  added
-                       ThisContextCertainlyHasSpanBarEngraverAddedButTheresSomethingFunny1.  Here.
+%                      thisContextHasBarEngraver1  added
+                       ThisContextCertainlyHasBarEngraverAddedButThereHasBeenSomethingFunnyBefore1.  Here.
                }
                \context LyricsVoice {
-                       this4 one has no SpanBarEngraverAddedToContext1
+                       this4 one has no BarEngraverAddedToContext1
                }
        >
        \notes \context Staff = SB { b1 b1 }
@@ -25,11 +25,11 @@ lyrics don't collide with barlines.
                linewidth = -1.0\cm;
                \translator {
                        \LyricsContext
-                       \consists "Span_bar_engraver";
                        \accepts "LyricsVoiceWithBars";
                }
                \translator {
                        \LyricsVoiceContext
+                       \consists "Bar_engraver";
                        \name "LyricsVoiceWithBars";
                }
                \translator {
index 339826fb6b172f84df02b0758f874c90367c7908..0428ab192f28f032f49b9e7055b31c96d7bfd204 100644 (file)
@@ -6,23 +6,6 @@ http://www.Arkkra.com/doc/star.ps
 
 \version "1.3.120";
 
-% TODO: 
-%
-%  * centre non-melismata lyrics (where there's only one verse!) under 
-%    notehead:
-%
-%      l       c    c    c    l
-%        ___
-%       |   |   |    |    |    |    |
-%      x|()x|  x|   x|   x|   x|( )x|
-%      Oh_____say  can  you   see
-%
-%  NOT!
-%
-%
-%  * slur/lyric clash
-%
-
 \header{
        title="The Star Spangled Banner";
        subtitle="The United States National Anthem";
@@ -139,12 +122,12 @@ text =  \lyrics {
                        \clef treble;
                        \property Staff.automaticMelismata = ##t
                        \context Voice = one \transpose c'' {
-                               \stemUp
+                               \voicOne
                                \staffBVoiceB
                                \bar "|.";
                        } 
                        \context Voice = two \transpose c'' {
-                               \stemDown
+                               \voiceTwo
                                \staffBVoiceC
                        }
                >
@@ -154,11 +137,11 @@ text =  \lyrics {
                        \clef bass;
                        \property Staff.VoltaBracket = \turnOff
                        \context Voice = three {
-                               \stemUp
+                               \voiceOne
                                \staffCVoiceB
                        } 
                        \context Voice = four {
-                               \stemDown
+                               \voiceTwo
                                \staffCVoiceC
                        } 
                >
@@ -171,11 +154,6 @@ text =  \lyrics {
                        \GrandStaffContext
                        \accepts "Lyrics";
                }
-% We have a Span_bar_engraver in GrandStaff; we only get grief if we add it here too.
-%              \translator {
-%                      \LyricsContext
-%                      \consists "Span_bar_engraver";
-%              }
                \translator {
                        \LyricsVoiceContext
                        \consists "Bar_engraver";
index 7be6f4c0aceb0ca41ede0934ce735ca16d31856c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,37 +0,0 @@
-\header{
-texidoc="
-Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that
-lyrics don't collide with barlines.
-";
-}
-
-\score {
-       \context StaffGroup <
-       \notes \context Staff {
-               b1 b1 \bar "|.";
-       }
-       \lyrics\context Lyrics <
-               \context LyricsVoiceWithBars {
-%                      thisContextHasSpanBarEngraver1  added
-                       ThisContextCertainlyHasSpanBarEngraverAddedButTheresSomethingFunny1.  Here.
-               }
-               \context LyricsVoice {
-                       this4 one has no SpanBarEngraverAddedToContext1
-               }
-       >
-       \notes \context Staff = SB { b1 b1 }
-       >
-       \paper {
-               linewidth = -1.0\cm;
-               \translator {
-                       \LyricsContext
-                       \accepts "LyricsVoiceWithBars";
-               }
-               \translator {
-                       \LyricsVoiceContext
-                       \consists "Bar_engraver";
-                       \name "LyricsVoiceWithBars";
-               }
-               
-       }
-}
index 07f3ecb1bfb99ab446c97942bb41a783b4f9b2df..8ef49ed00d190694fc7e9dfa242170ec94d7cb31 100644 (file)
@@ -8,6 +8,7 @@
 \score{
        \notes\relative c''{
                \stemUp
+% {
                a-"text"
                b-#"texta"
                c-#'(bold "textb")
                  (italic "three"))
                f-#'(finger "3")
                g-#'(music (named "noteheads-2" "flags-u3"))
-               
-               b-#'(rows "a" ((kern . 3) ((raise . 2) "b")) "c")
-               c-#'(rows "1" ((kern . -3) ((raise . -2) "2")) "3")
-               
+               b-#'(rows "a" (((kern . 3) (raise . 2)) "b") "c")
+               c-#'(rows "1" (((raise . -2) (kern . -1)) "2") "3")
+% }
+               d-#'(lines "Violoncello" "    e" "Contrabasso")
+               e-#'((lines (baselineskip . 0) (kern . 1.5)) "Violoncello" "    e" "Contrabasso")
+               e-#'(((baselineskip . 0) (kern . 1.5) lines) "Violoncello" "    e" "Contrabasso")
                }
        \paper{
                linewidth = -1.\mm;
index 64f7ba7f154a15bfaf9b7c40f74df3ce280d09d7..d46b66856ae9c7b11ef4a2414ec6695c4319f0ca 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.3.120";
+\version "1.3.130";
 
 \include "paper16.ly";
 
@@ -122,10 +122,10 @@ contrabasso = \notes\relative c {
       >
       \context Staff = clarinets <
         \property Staff.midiInstrument = #"clarinet"
-       \property Staff.instrument = #`((kern . 0.5)
-         (lines "2 Clarinetti" (rows "(B" ,text-flat ")")))
-       \property Staff.instr = #`((kern . 0.5)
-         (lines "Cl."  (rows "(B" ,text-flat ")")))
+       \property Staff.instrument = #`(lines
+         "2 Clarinetti" (rows "(B" ,text-flat ")"))
+       \property Staff.instr = #`(lines
+         "Cl."  (rows "(B" ,text-flat ")"))
        \property Staff.transposing = #-2
        \notes \key f \major;
        \context Voice=one \partcombine Voice
@@ -145,10 +145,10 @@ contrabasso = \notes\relative c {
     \context StaffGroup = brass <
       \context Staff = frenshHorns <
         \property Staff.midiInstrument = #"french horn"
-       \property Staff.instrument = #`((kern . 0.5)
-         (lines "2 Corni" (rows "(E" ,text-flat ")")))
-       \property Staff.instr = #`((kern . 0.5)
-         (lines "Cor."  (rows "(E" ,text-flat ")")))
+       \property Staff.instrument = #`(lines
+         "2 Corni" (rows "(E" ,text-flat ")"))
+       \property Staff.instr = #`(lines
+         "Cor."  (rows "(E" ,text-flat ")"))
        \property Staff.transposing = #3
        \notes \key c \major;
        \context Voice=one \partcombine Voice
@@ -157,10 +157,10 @@ contrabasso = \notes\relative c {
       >
       \context Staff = trumpets <
        \property Staff.midiInstrument = #"clarinet"
-       \property Staff.instrument = #`((kern . 0.5)
-         (lines "2 Trombe" (rows "(C)")))
-       \property Staff.instr = #`((kern . 0.5)
-         (lines "Tbe." (rows "(C)")))
+       \property Staff.instrument = #`(lines
+         "2 Trombe" (rows "(C)"))
+       \property Staff.instr = #`(lines
+         "Tbe." (rows "(C)"))
        \context Voice=one \partcombine Voice
          \context Thread=one \tromboI
          \context Thread=two \tromboII
@@ -169,8 +169,8 @@ contrabasso = \notes\relative c {
     \context StaffGroup = timpani <
       \context Staff = timpani <
        \property Staff.midiInstrument = #"timpani"
-       \property Staff.instrument = #'((kern . 0.5)
-         (lines "2 Timpani" "(C-G)"))
+       \property Staff.instrument = #'(lines
+         "2 Timpani" "(C-G)")
        \property Staff.instr = #"Timp."
        \clef bass;
        \timpani
@@ -204,8 +204,8 @@ contrabasso = \notes\relative c {
        \staffCombinePianoStaffProperties
         \context Staff=one <
          \property Staff.midiInstrument = #"cello"
-         \property Staff.instrument = #'((kern . 0.5)
-           (lines "Violoncello" (rows "    e") (rows "Contrabasso")))
+         \property Staff.instrument = #'(lines
+           "Violoncello" "    e" "Contrabasso")
          \property Staff.instr = "Vc."
          \clef bass;
        >
index 5df8930a30054f7e3cd364dc260e3e666fa6f36b..d155be0d151ab95a0740695d72fa66847800d0fb 100644 (file)
@@ -132,6 +132,8 @@ A2_engraver::acknowledge_grob (Grob_info i)
          
   if (Stem::has_interface (i.elem_l_)
       || Slur::has_interface (i.elem_l_)
+      // || Tie::has_interface (i.elem_l_)
+      || i.elem_l_->has_interface (ly_symbol2scm ("tie-interface"))
       /*
        Usually, dynamics are removed by *_devnull_engravers for the
        second voice.  On the one hand, we don't want all dynamics for
index 0ee7890743f93e6a0ef6b325480b18f957a8b5c4..f46e55c3c0472bdc440e605b197db21b34a5179d 100644 (file)
@@ -73,12 +73,12 @@ Bar::compound_barline (Grob*me, String str, Real h)
     {
       return thin;
     }
-  else if (str == "|.")
+  else if (str == "|." || (h == 0 && str == ":|"))
     {
       m.add_at_edge (X_AXIS, LEFT, thick, 0);      
       m.add_at_edge (X_AXIS, LEFT, thin, kern);
     }
-  else if (str == ".|")
+  else if (str == ".|" || (h == 0 && str == "|:"))
     {
       m.add_at_edge (X_AXIS, RIGHT, thick, 0);
       m.add_at_edge (X_AXIS, RIGHT, thin, kern);
index ebe406f1f849d7533acc49c46b3c619c5d8aacf1..9e2087b41b902f43aaf2d70af05857fcb0f9ad07 100644 (file)
@@ -46,7 +46,7 @@ Chord_name_engraver::Chord_name_engraver ()
 {
   chord_name_p_ = 0;
   chord_ = gh_cons (SCM_EOL, gh_cons (SCM_EOL, SCM_EOL));
-  last_chord_ = SCM_EOL;
+  last_chord_ = chord_;
 }
 
 void
@@ -94,7 +94,7 @@ Chord_name_engraver::create_grobs ()
       chord_name_p_->set_grob_property ("chord", chord_);
       announce_grob (chord_name_p_, 0);
       SCM s = get_property ("chordChanges");
-      if (to_boolean (s) && last_chord_ != SCM_EOL
+      if (to_boolean (s) && gh_car (last_chord_) != SCM_EOL
                  && gh_equal_p (chord_, last_chord_))
        chord_name_p_->set_grob_property ("begin-of-line-visible", SCM_BOOL_T);
     }
@@ -109,7 +109,8 @@ Chord_name_engraver::stop_translation_timestep ()
     }
   chord_name_p_ = 0;
 
-  last_chord_ = chord_;
+  if (gh_car (chord_) != SCM_EOL)
+    last_chord_ = chord_;
   chord_ = gh_cons (SCM_EOL, gh_cons (SCM_EOL, SCM_EOL));
 }
 
index 15373296c6af8e015a990e81bb0ca040866fbd96..246f3fc47ad0dd20a5a25245f6bb5a8f5390e1e0 100644 (file)
@@ -21,7 +21,7 @@ public:
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
   static Molecule text2molecule (Grob *me, SCM text, SCM properties);
   static Molecule string2molecule (Grob *me, SCM text, SCM properties);
-  static Molecule markup_sentence2molecule (Grob *me, SCM markup_sentence, SCM properties);
+  static Molecule markup_text2molecule (Grob *me, SCM markup_text, SCM properties);
 
 private:
   static Molecule lookup_character (Grob *me, Font_metric*, SCM char_name);
index 29538a1f8bc87ea480115b49e164da5a2286a562..d3b1bb2ade65b5a5130495db52f8f9c9cbc4558d 100644 (file)
 
 
 /*
-    TEXT : STRING | (MARKUP SENTENCE)
-    MARKUP: PROPERTY | ABBREV
-    SENTENCE: TEXT | SENTENCE TEXT
-    PROPERTY: (key . value)
-    ABBREV: rows lines roman music bold italic named super sub text, or any font-style
- */
-
-/*
-  FIXME:
-
-  rewrite routines and syntax to be like
 
   TEXT: STRING
-      | (head-expression* TEXT*)
-      ;
-
-  head-expression is a list, containing a tag and a variable number of
-  arguments. If necessary, the number of arguments can be stored in a alist,
+        | (MARKUP? TEXT+)
+        ;
 
-  '(
-   (tag1 . argcount1)
-   (tag2 . argcount2)
+  HEAD: MARKUP-ITEM | (MARKUP-ITEM+)
 
-   ... etc
+  MARKUP-ITEM: PROPERTY | ABBREV | FONT-STYLE
+  PROPERTY: (key . value)
+  ABBREV: rows lines roman music bold italic named super sub text
    
-   )
-
-   or even entries like
-
-   (tag . (argcount function-to-handle-the-tag  ))
-
-   use baselineskip for setting (lines ...)
-
 */
 
 Molecule
@@ -65,7 +43,7 @@ Text_item::text2molecule (Grob *me, SCM text, SCM alist_chain)
       if (!gh_pair_p (gh_car (text)) && gh_string_p (gh_car (text)))
        return string2molecule (me, gh_car (text), alist_chain);
       else
-       return markup_sentence2molecule (me, text, alist_chain);
+       return markup_text2molecule (me, text, alist_chain);
     }
   return Molecule ();
 }
@@ -134,61 +112,71 @@ Text_item::lookup_text (Grob *me, Font_metric*fm, SCM text)
 }
 
 Molecule
-Text_item::markup_sentence2molecule (Grob *me, SCM markup_sentence,
-                                    SCM alist_chain)
+Text_item::markup_text2molecule (Grob *me, SCM markup_text,
+                              SCM alist_chain)
 {
   SCM sheet = me->paper_l ()->style_sheet_;
   SCM f = gh_cdr (scm_assoc (ly_symbol2scm ("markup-to-properties"), sheet));
   
-  SCM markup = gh_car (markup_sentence);
-  SCM sentence = gh_cdr (markup_sentence);
-  
+  SCM markup = gh_car (markup_text);
+  SCM text = gh_cdr (markup_text);
+
+#if 1
   SCM p = gh_cons  (gh_call2 (f, sheet, markup), alist_chain);
+#else
+  SCM pp = gh_call2 (f, sheet, markup);
+  gh_newline ();
+  scm_write (pp, scm_current_error_port ());
+  gh_newline ();
+  SCM p = gh_cons (pp, alist_chain);
+#endif
+
+  Real staff_space = Staff_symbol_referencer::staff_space (me);
 
   Axis align = X_AXIS;
   SCM a = ly_assoc_chain (ly_symbol2scm ("align"), p);
   if (gh_pair_p (a) && gh_number_p (gh_cdr (a)))
     align = (Axis)gh_scm2int (gh_cdr (a));
 
-  Real staff_space = Staff_symbol_referencer::staff_space (me);
-  Real kern = 0;
+  Real baseline_skip = 0;
+  SCM b = ly_assoc_chain (ly_symbol2scm ("baseline-skip"), p);
+  if (gh_pair_p (b) && gh_number_p (gh_cdr (b)))
+    baseline_skip = gh_scm2double (gh_cdr (b)) * staff_space;
+  
+  Array<Real> kern (2);
+  kern[0] = 0; // zucht
+  kern[1] = 0;
   SCM k = ly_assoc_chain (ly_symbol2scm ("kern"), p);
   if (gh_pair_p (k) && gh_number_p (gh_cdr (k)))
-    kern = gh_scm2double (gh_cdr (k)) * staff_space;
+    kern[align] = gh_scm2double (gh_cdr (k)) * staff_space;
                             
   Real raise = 0;
   SCM r = ly_assoc_chain (ly_symbol2scm ("raise"), p);
   if (gh_pair_p (r) && gh_number_p (gh_cdr (r)))
     raise = gh_scm2double (gh_cdr (r)) * staff_space;
 
-#if 0
-  Offset o (align == X_AXIS ? kern : 0,
-           (align == Y_AXIS ? - kern : 0) + raise);
-#else
-  Offset o (0, (align == Y_AXIS ? - kern : 0) + raise);
-#endif
+  Offset o (0, (align == Y_AXIS ? - kern[align] : 0) + raise);
+   
   Molecule mol;
-  while (gh_pair_p (sentence))
+  while (gh_pair_p (text))
     {
-      /* Ugh: this (kerning) only works if 'kern' is the first modifier of a
-        markup.  I guess the only solution is to rewrite markup definition,
-        see above. */
-      Molecule m = text2molecule (me, gh_car (sentence), p);
-      Real m_kern = 0;
+      Molecule m = text2molecule (me, gh_car (text), p);
       SCM m_p = SCM_EOL;
-      if (gh_pair_p (gh_car (sentence)))
-       m_p = gh_cons  (gh_call2 (f, sheet, gh_caar (sentence)), alist_chain);
+      if (gh_pair_p (gh_car (text)))
+       m_p = gh_cons  (gh_call2 (f, sheet, gh_caar (text)), alist_chain);
       SCM m_k = ly_assoc_chain (ly_symbol2scm ("kern"), m_p);
+      Real m_kern = kern[align];
       if (gh_pair_p (m_k) && gh_number_p (gh_cdr (m_k)))
        m_kern = gh_scm2double (gh_cdr (m_k)) * staff_space;
 
       if (!m.empty_b ())
        {
          m.translate (o);
+         if (align == Y_AXIS && baseline_skip)
+           m_kern += baseline_skip - m.extent (Y_AXIS)[UP];
          mol.add_at_edge (align, align == X_AXIS ? RIGHT : DOWN, m, m_kern);
        }
-      sentence = gh_cdr (sentence);
+      text = gh_cdr (text);
     }
   return mol;
 }
index ccfb55813ed1fdb905702ed5fdac1857fc79b8e8..39623a205622f4c36865886cedfd67884a48a729 100644 (file)
@@ -291,7 +291,9 @@ ChordNamesVoiceContext = \translator {
        \consistsend "Axis_group_engraver";
        \consists "Separating_line_group_engraver";
        \consists "Chord_name_engraver";
+       \consists "Skip_req_swallow_translator";
 }
+
 ChordNamesContext = \translator {
        \type "Engraver_group_engraver";
        \name ChordNames;
index d73cf04da2e219c1aabb20e9f89391363cef37a5..4ae2d3b4e2ab4c6a41fde1ea15e1106f6f8d2d1a 100644 (file)
@@ -20,32 +20,43 @@ tieDown = \property Voice.Tie \override #'direction = #-1
 tieBoth = \property Voice.Tie \revert #'direction 
 
 cadenzaOn = \property Score.timing = ##f
-cadenzaOff = { \property Score.timing = ##t
-       \property Score.measurePosition = #(make-moment 0 1)
-       }
+cadenzaOff = {
+  \property Score.timing = ##t
+  \property Score.measurePosition = #(make-moment 0 1)
+}
 
        
 oneVoice = {   
-       \stemBoth
-       \tieBoth
-       \shiftOff
+  \stemBoth
+  \slurBoth
+  \tieBoth
+  \shiftOff
+}
+
+voiceOne = {
+  \stemUp
+  \slurUp
+  \tieUp
 }
 
-voiceOne = { \stemUp
-   \tieUp
+voiceTwo = {
+  \stemDown
+  \slurDown
+  \tieDown
 }
-voiceTwo = { \stemDown
-   \tieDown
-   }
    
 voiceThree = {
-       \stemUp
-       \shiftOn
+  \stemUp
+  \slurUp
+  \tieUp
+  \shiftOn
 }
 
 voiceFour = {
-       \stemDown
-       \shiftOn
+  \stemDown
+  \slurDown
+  \tieDown
+  \shiftOn
 }
 
 slurDotted = \property Voice.Slur \override #'dashed = #1
index 07f834a6cf64e9753cde2e66faa24adc0690c0a6..18dedd5e05aaf39627bdaeb0d69d014872babf3d 100644 (file)
@@ -7,8 +7,8 @@ bassiGroup =  \context PianoStaff = bassi_group \notes <
         \staffCombinePianoStaffProperties
        \context Staff=oneBassi {
                \property Staff.midiInstrument = #"cello"
-               \property Staff.instrument = #'((kern . 0.5)
-               (lines "Violoncello" (rows "    e") (rows "Contrabasso")))
+               \property Staff.instrument = #'(lines
+                 "Violoncello" "    e" "Contrabasso")
 
                \property Staff.instr = #"Vc."
                \clef "bass";
index b3e1ad19677a18f6d692f8c56147074ea7c9e5c1..34eb038cba97b3f3edb1274e00299af24cb0ea30 100644 (file)
@@ -7,11 +7,10 @@
 clarinettiStaff = \context Staff = clarinetti <
        \property Staff.midiInstrument = #"clarinet"
 
-       \property Staff.instrument = #`((kern . 0.5)
-       (lines "2 Clarinetti" (rows "(B" ,text-flat ")")))
+       \property Staff.instrument = #`(lines
+         "2 Clarinetti" (rows "(B" ,text-flat ")"))
        
-       \property Staff.instr = #`((kern . 0.5)
-       (lines "Cl."  (rows "(B" ,text-flat ")")))
+       \property Staff.instr = #`(lines "Cl."  (rows "(B" ,text-flat ")"))
 
        % urg: can't; only My_midi_lexer:<non-static> () parses pitch?
        %\property Staff.transposing = "bes"
index 644a66753e4fcb25a6b4b9067cd72025343d8886..0bdc166596ee3652565bece3c2bdc5079a45793e 100644 (file)
@@ -7,11 +7,10 @@
 corniStaff = \context Staff = corni <
        \property Staff.midiInstrument = #"french horn"
 
-       \property Staff.instrument = #`((kern . 0.5)
-       (lines "2 Corni" (rows "(E" ,text-flat ")")))
+       \property Staff.instrument = #`(lines
+         "2 Corni" (rows "(E" ,text-flat ")"))
        
-       \property Staff.instr = #`((kern . 0.5)
-       (lines "Cor."  (rows "(E" ,text-flat ")")))
+       \property Staff.instr = #`(lines "Cor."  (rows "(E" ,text-flat ")"))
 
        % urg: can't; only My_midi_lexer:<non-static> () parses pitch?
        %\property Staff.transposing = "es"
index c01276cf7e352108ff2d05f30d16c23a1d1b093f..1e91be78b4906e2577a8f8e786c817b6d4eb3738 100644 (file)
@@ -137,8 +137,8 @@ timpani =  \notes \relative c {
 
 timpaniStaff =  \context Staff = timpani <
        \property Staff.midiInstrument = #"timpani"
-       \property Staff.instrument = #'((kern . 0.5)
-       (lines "2 Timpani" "(C-G)"))
+       \property Staff.instrument = #'(lines
+         "2 Timpani" "(C-G)")
        \property Staff.instr = #"Timp."
        \clef "bass";
        \Time
index 39e21e435bc4bca891c8772de391d832f6232d05..775dd7fe3f731f0689440b4e9ad51ccbe3b93387 100644 (file)
@@ -8,10 +8,8 @@ trombeStaff =  \context Staff = trombe <
        \context Staff=trombe {
                \property Staff.midiInstrument = #"trumpet"
 
-               \property Staff.instrument = #`((kern . 0.5)
-               (lines "2 Trombe" (rows "(C)")))
-               \property Staff.instr = #`((kern . 0.5)
-               (lines "Tbe." (rows "(C)")))
+               \property Staff.instrument = #`(lines "2 Trombe" (rows "(C)"))
+               \property Staff.instr = #`(lines "Tbe." (rows "(C)"))
 
                \notes { \key c \major; }
                \End
index 933048f83bc75a759b5a49f3e30442b37b38e63a..f20f70d71eb20dea4390d5d09c74f922bca6ea4a 100644 (file)
   (pitch->text pitch))
 
 (define (pitch->chord-name-text-banter pitch)
-  (pitch->text-banter))
+  (pitch->text-banter pitch))
 
 (define (pitch->note-name-text-banter pitch)
-  (pitch->text-banter))
+  (pitch->text-banter pitch))
 
 (define (step->text pitch)
   (string-append
index 869df85fdf3e191bcb60e43137fb1b3bc1beca9d..538726baefd7cd409a9d56dbd9c0156eaff065f7 100644 (file)
@@ -322,11 +322,22 @@ and warn if the selected font is not unique.
     ))
 
 (define (markup-to-properties sheet markup)
-  ;;(display "markup: `")
-  ;;(write markup)
-  ;;(display "'\n")
+  ;; (display "markup: `")
+  ;; (write markup)
+  ;; (display "'\n")
+  
   (if (pair? markup)
-      (list markup)
+      (if (and (symbol? (car markup)) (not (pair? (cdr markup))))
+         (if (equal? '() (cdr markup))
+             (markup-to-properties sheet (car markup))
+             (list markup))
+         
+         (if (equal? '() (cdr markup))
+             (markup-to-properties sheet (car markup))
+             (append (markup-to-properties sheet (car markup))
+                     (markup-to-properties sheet (cdr markup)))))
+      
+      ;; markup is single abbreviation
       (let ((entry (assoc markup
                          ;; assoc-chain?
                          (append (cdr (assoc 'abbreviation-alist sheet))
@@ -335,6 +346,7 @@ and warn if the selected font is not unique.
            (cdr entry)
            (list (cons markup #t))))))
 
+
 ; fixme, how's this supposed to work?
 ; and why don't we import font-setting from elt?
 (define (style-to-font-name sheet style)
index b1ecfc0a2a1696700b039a59623dc065e229b3f1..956ca621c3aa0bc37812f7bf21e8ed75a3fe4989 100644 (file)
                (molecule-callback . ,Text_item::brew_molecule)         
                (break-align-symbol . Instrument_name)
                (visibility-lambda . ,begin-of-line-visible)
+               (baseline-skip . 2)
                (font-family . roman)
                (meta . ,(grob-description "InstrumentName"  font-interface  text-interface break-aligned-interface))
        ))
                (molecule-callback . ,Text_item::brew_molecule)
                (no-spacing-rods . #t)
                (padding . 0.5)
+               (baseline-skip . 2)
                (font-family . roman)
                (font-shape . italic)
                (meta . ,(grob-description "TextScript" text-script-interface text-interface side-position-interface font-interface ))
index e610eb5a030157f3185937d4502fa79aeec367a3..c83b2d2f4fb9aebc5bae9a5470e55f301fdb6661 100644 (file)
@@ -47,6 +47,7 @@ In the case of alignment grobs, this should contain only one number.")
 (grob-property-description 'bar-size number? "size of a bar line.")
 (grob-property-description 'bars list? "list of barline pointers.")
 (grob-property-description 'barsize-procedure procedure? "Procedure that computes the size of a bar line.")
+(grob-property-description 'baseline-skip number? "Baseline skip to use for multiple lines of text.")
 (grob-property-description 'bass list? " musical-pitch, optional.")
 (grob-property-description 'beam ly-grob? "pointer to the beam, if applicable.")
 (grob-property-description 'beam-space-function procedure? "function returning space given multiplicity.")
@@ -252,19 +253,14 @@ one end of the stem.")
 Scheme markup text.  It is defined as follows:
 
 @example
-
-TEXT : STRING | (MARKUP SENTENCE)
-SENTENCE: TEXT | SENTENCE TEXT
-MARKUP: PROPERTY | ABBREV
-PROPERTY: (key . value)
-ABBREV: rows lines roman music bold italic named super sub text, or any font-style
+text: string | (head? text+)
+head: markup | (markup+)
+markup-item: property | abbrev | @var{fontstyle}
+property: (@var{key} . @var{value})
+abbrev: @code{rows lines roman music bold italic named super sub text}
 
 @end example
 
-So, TEXT is either a string, or a list of which the CAR is a MARKUP.
-MARKUP is either a CONS: an grob property '(key . value) or a symbol:
-a predefined abbreviation for a list of grob properties.
-
 
 The following abbreviations are currently defined:
 @table @samp
index 7d5ee12eaaedd8d5b5039f14ad8c68faf5bf1990..4742c4b3254ba091c39d503d3affe7e1037c9ce7 100644 (file)
@@ -445,7 +445,7 @@ font-point-size font-relative-size)
   (lily-interface
    'text-interface
    "A scheme markup text"
-   '(text align lookup raise kern magnify)))
+   '(text align baseline-skip lookup raise kern magnify)))
 
 (define dot-column-interface
   (lily-interface