Mats Bengtsson <[EMAIL PROTECTED]> writes: > Could you please provide links to the emails you have in mind. > I guess that the first one is > http://lists.gnu.org/archive/html/lilypond-user/2007-04/msg00039.html > but I have posted too many "ugly solutions" to different problems to be > able to recall them or find them when searching the mailing list archives. > > /Mats >
Sure, its: http://www.nabble.com/No-clef-and-key-each-line-tf1469580.html#a4014024 Sorry for not providing it in my first post. I have included a minimal example of what I want to do. My sectionNumber Problem is not related to your code, but the Clef and TimeSignature stencil = ##f, which messes up spacing. I commented that out in the example. The problem is that when I insert \bar "||", the beginning bar lines get messed up. If you uncomment the lines containing the sectionNumber and \override commands, you'll see what I wanted to do: Remove time signatures and clefs from everything but the first line, and insert my section letters, in order to achieve a “real-book-like” look. Regards, dhl \version "2.10.25" #(define-public (index-cell cell dir) (if (equal? dir 1) (cdr cell) (car cell))) #(define-public (bar-line::my-calc-glyph-name grob) (let* ( (glyph (ly:grob-property grob 'glyph)) (dir (ly:item-break-dir grob)) (result (assoc glyph '((":|:" . (":|" . "|:")) ("||:" . ("||" . "|:")) ("|" . ("|" . "|")) ("||:" . ("||" . "|:")) ("|s" . (() . "|")) ("|:" . ("|" . "|:")) ("|." . ("|." . ())) ;; hmm... should we end with a bar line here? (".|" . ("|" . ".|")) (":|" . (":|" . ())) ("||" . ("||" . ())) (".|." . (".|." . ())) ("" . ("" . "")) (":" . (":" . "")) ("." . ("." . ())) ("empty" . (() . ())) ("brace" . (() . "brace")) ("bracket" . (() . "bracket")) ))) (glyph-name (if (= dir CENTER) glyph (if (and result (string? (index-cell (cdr result) dir))) (index-cell (cdr result) dir) #f))) ) (if (not glyph-name) (ly:grob-suicide! grob)) glyph-name)) sectionLetter = #(define-music-function (parser location letter) (string?) #{ \once \override Score.RehearsalMark #'extra-offset = #'(-9 . 1) \mark \markup{\box{\bold{ $letter }}} #}) harmonies = \chords { c1 c c c c c c c c c c c c c c c } melody = \relative c' { % \sectionLetter "A" c1 c c c \bar "||" \break % \override Staff.Clef #'stencil = ##f % \override Staff.TimeSignature #'stencil = ##f c c c c \break % \sectionLetter "B" c c c c \bar "||" \break c c c c \bar "|." } \score { << \new ChordNames \harmonies \new Staff \melody >> \layout { indent = 0.0\cm \context { \Score \remove "Bar_number_engraver" \override BarLine #'glyph-name = #bar-line::my-calc-glyph-name } } } _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user