Bonjour Gérard,
Sinon tu peux faire quelque chose comme :
\version "2.20.0"
#(define ctrToc 0)
#(define-markup-command (ctrToc layout props) ()
(set! ctrToc (1+ ctrToc))
(interpret-markup layout props (markup (number->string ctrToc))))
#(define counter 0)
#(define-markup-command (counter layout props) ()
(set! counter (1+ counter))
(interpret-markup layout props (markup (number->string counter))))
#(define-markup-command (ctrTot layout props) ()
(set! counter counter)
(interpret-markup layout props (markup (number->string counter))))
\paper {
tocItemMarkup = \tocItemWithDotsMarkup
}
\markuplist \table-of-contents
\markup\vspace #3
\tocItem \markup\counter
\score { { c' } \header { piece = \markup { Pièce \ctrToc } } }
\tocItem \markup\counter
\score { { c' } \header { piece = \markup { Pièce \ctrToc } } }
\tocItem \markup\counter
\score { { c' } \header { piece = \markup { Pièce \ctrToc } } }
\tocItem \markup\counter
\score { { c' } \header { piece = \markup { Pièce \ctrToc } } }
\tocItem \markup\counter
\score { { c' } \header { piece = \markup { Pièce \ctrToc } } }
\markup { Ce livret contient \ctrTot pièces }
Cordialement,
Pierre