Am Mo., 1. Sept. 2025 um 07:42 Uhr schrieb Jeff Olson <[email protected]>:
>
> On 8/31/2025 3:17 AM, Thomas Morley wrote:
> > Actually, this is not a problem of string-lines or column-lines.
> > `markuplist` itself fails:
> >    \markuplist { "A" "" "C" }
> > with:
> > programming error: insane spring min_distance requested, ignoring it
>
> Thank you so much for looking into this! And for your revised
> string-lines function, which allows me to get back to work.
>
> About the markuplist failure you mentioned above,  I'm curious why that
> failure does not propagate into subsequent markuplists in the same way
> that I found with the full column-line string-lines approach I showed in
> my previous mail.
>
> For example, in this code the error in the first markuplist does not
> affect the D E F markuplist.
>
> \markuplist { "A" "" "C" }
> \markuplist { "D" "E" "F" }
>
> Maybe it's because this particular error just doesn't trigger the
> one-line-per-page problem I was having.
>
> That's in contrast to the code below which does propagate paging
> problems into D E F.
>
> \markuplist { \column-lines \string-lines "A\n \n C" }
> \markuplist { \column-lines \string-lines "D\n E\n F" }
>
> Of course, your string-lines-rev would handle this fine, thank you.
>
> But even just column-lines alone will propagate pagination problems into
> D E F:
>
> \markuplist { \column-lines { "A" "" "C" } }
> \markuplist { \column-lines { "D" "E" "F" } }
>
> Somehow column-lines makes the markuplist / pagination problems much
> more severe.
>
> Anyway, just curious.  I'll happily be using your string-lines-rev for
> my extended stanzas.
>
> Thanks again,
> Jeff
>

Afaict, markuplist is not really prepared to deal with empty stencils
- horizontally as well as vertically.
So with
> \markuplist { "A" "" "C" }
> \markuplist { "D" "E" "F" }
the second one (placed _vertically_ below) is not affected, because
the problem is _horizontally_.

column-lines can be fixed in the same way as string-lines:

#(define-markup-list-command (column-lines-rev layout props args)
  (markup-list?)
  #:properties ((baseline-skip)
                (keep-empty #t))
  (let* ((stils (interpret-markup-list layout props args))
         (stils-rev
           (if keep-empty
               (map
                 (lambda (stil)
                   (if (ly:stencil-empty? stil) point-stencil stil))
                 stils)
               (remove ly:stencil-empty? stils))))

    (space-lines baseline-skip stils-rev)))


\markuplist
  \box
  \column-lines-rev { "A" "" "C" }

\markuplist
  \box
  \override-lines #'(keep-empty . #f)
  \column-lines-rev { "A" "" "C" }


Though, I'm not sure whether fixing each markuplist-command is the
best way to proceed.


Cheers,
  Harm

Reply via email to