I will try to create a MWE if that is required to track down the problem.

A *minimal* example is not strictly required (though helpful), but
*some* example is — otherwise, there is nothing we can do, sorry.

Attached is a fairly short example that shows the described behaviour with 2.25.10

The problem seems to be created by the code copied from LSR snippet 888. When the \layout{} section is commented out, everything compiles fine. So maybe it's not a lilypond problem but one of LSR snippet 888.

The attached example from the previous email did have a function \paradyn not removed. The attached version does have it removed. Sorry for sending the wrong file.

As an additional finding:
Not only removing the \layout{} does make the error go away, removing the '\new ChoirStaff <<' with the corresponding '>>' makes the error go away as well.

Not sure what the problem could be.

Kind regards,
Michael
--
 Michael Gerdau       email: m...@qata.de
 GPG-keys available on request or at public keyserver
\version "2.25.9"

%% Start LSR snippet 888

%% http://lsr.di.unimi.it/LSR/Item?id=888

%LSR by Wolf Alight
%=>http://lists.gnu.org/archive/html/lilypond-user/2010-02/msg00444.html
%=>http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00800.html

%LSR modified by Alexander Kobel
%=>http://permalink.gmane.org/gmane.comp.gnu.lilypond.general/89675

%LSR modified by Thomas Morley
%=>http://lilypond.1069038.n5.nabble.com/LyricText-center-on-word-breaks-lyricMelismaAlignment-tt183456.html

%% Note: Only characters of the string used to define space-set
%% are recognized by 'center-on-word'
#(define space-set
  (list->char-set
    (string->list ".?-;,:„“”‘’–— */()[]{}|<>!`~&…‥")))

#(define (width grob text)
  (let* ((X-extent
           (ly:stencil-extent (grob-interpret-markup grob text) X)))
   (if (interval-empty? X-extent)
       0
       (cdr X-extent))))

#(define (center-on-word grob)
  (let* ((text (ly:grob-property-data grob 'text))
         (syllable (markup->string text))
         (word-position
           (if (string-skip syllable space-set)
               (string-skip syllable space-set)
               0))
         (word-end
           (if (string-skip-right syllable space-set)
               (+ (string-skip-right syllable space-set) 1)
               (string-length syllable)))
         (preword (substring syllable 0 word-position))
         (word (substring syllable word-position word-end))
         (preword-width (width grob preword))
         (word-width (width grob (if (string-null? syllable) text word)))
         (note-column (ly:grob-parent grob X))
         (note-column-extent (ly:grob-extent note-column note-column X))
         (note-column-width (interval-length note-column-extent)))

  (-
    (*
      (/ (- note-column-width word-width) 2)
      (1+ (ly:grob-property-data grob 'self-alignment-X)))
    preword-width)))

%% For general use this take this layout-setting
%% In the example below the override is applied to selected Lyrics only
%%
\layout {
  \context {
    \Lyrics
    \override LyricText.X-offset = #center-on-word
  }
}

%% End LSR snippet 888



sopranoOne = \relative bes' {
  \time 3/2
  R1*3/2*2 | bes2.\f c4 d2 | f2. es4 d2 \bar "||"
  \time 2/2 \tempo \markup { "[" \smaller \note {1} #UP = \smaller \note {1.} 
#UP "]" } 1=62
  es1~\mp | es1 | d1 | r2 bes8[ c d es] f4. es8 d4 d |
  \bar "|."
}

sopranoOneVerse = \lyricmode {
  Ho -- di -- e, ho -- di -- e, Chri -- stus, na -- _ _ _ tus est,
  No -- e, __ No -- e, No -- e, No -- e, No -- e, No -- e.
}

\score {
  %\new ChoirStaff <<
    \new Staff \with {
      midiInstrument = "acoustic grand"
      instrumentName = "Soprano I"
    }
    \new Voice = "soprano1" \sopranoOne
    \new Lyrics \lyricsto "soprano1" { \sopranoOneVerse }
  %>>
}

Reply via email to