lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

input/regression/footnote-auto-numbering-vertical-order.ly is broken


From: Thomas Morley
Subject: input/regression/footnote-auto-numbering-vertical-order.ly is broken
Date: Sun, 15 Dec 2019 17:03:50 +0100

Hi,

while working on #5640 "Fix regtests about Footnote"
https://sourceforge.net/p/testlilyissues/issues/5640/
I noticed input/regression/footnote-auto-numbering-vertical-order.ly is broken.

The problem is that since #1773 "Add Footnote_engraver to Score context"
https://sourceforge.net/p/testlilyissues/issues/1773/
\override FootnoteItem.numbering-assertion-function always fails now,
if correctly applied to Score _and_ more than one FootnoteItem happen
at the same time, p.e.in simultaneous music.

Short example:

#(define (make-footnote-numbering-assertion-function n)
  (lambda (x)
    (if (not (= n x))
      (ly:warning (_ "Expecting number ~a, got ~a") n x))))

#(set-default-paper-size "a6")

<<
  \new Staff
    {
        \once \override Score.FootnoteItem.numbering-assertion-function =
          #(lambda (grob) (make-footnote-numbering-assertion-function 0))
        \footnote #'(1 . -1) "1. footnote" b
    }
  \new Staff
    {
        \once \override Score.FootnoteItem.numbering-assertion-function =
          #(lambda (grob) (make-footnote-numbering-assertion-function 1))
        \footnote #'(1 . -1) "2. footnote" b
    }
>>

The numbering-assertion-function receives two values 0 and 1. Thus it
can't assert any fix value anymore.
Currently I can't find a way out.
Suggestions/hints?

Background:
numbering-assertion-function was implemented with

commit 5ac2664c2207e8dfa1734d786e5c7b214b275521
Author: Mike Solomon <address@hidden>
Date:   Fri Dec 2 08:06:13 2011 +0100

    Adds a numbering-assertion-function property to the footnote grob.

    This allows the footnote regtests to verify that the footnotes are
    being numbered in the correct order.

for 2.15.21

Moving Footnote_engraver with:
commit 3f0f59297670174562e7d66ae7dd8d73a04be6f8
Author: David Kastrup <address@hidden>
Date:   Fri May 25 18:41:46 2012 +0200

    Issue 1773: move Footnote_engraver to Score context

for 2.15.40

The problem remained undetected because the
numbering-assertion-function was not called with Score-context, so it
didn't work at all.
The regtest does not rely on a visual diff, but on a triggered
ly:error, which then never happened anymore.

The regtest footnote-auto-numbering.ly uses
numbering-assertion-function as well, but without simultaneous
Footnotes, thus it works there.


Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]