Hello,

I'm currently trying to find some solutions to this issue :
http://code.google.com/p/lilypond/issues/detail?id=737
I started implementing a solution for endnotes (attached). It is based on
this snippet : http://lsr.dsi.unimi.it/LSR/Item?id=728
As you can see, there is a problem when classifying the endnotes.

Instead of having :

score endnote1
text endnote1
score endnote 2
text endnote2

we get :

score endnote1
score endnote 2
text endnote1
text endnote2

Maybe it's related to this :
http://lists.gnu.org/archive/html/bug-lilypond/2010-10/msg00144.html
All day long I tried to find a solution.

Thanks

Regards,
Bertrand Bordage
\version "2.13.49"

#(define notenr 0)
#(define (add-endnote-item! text) #f)
#(define (endnote-items) #f)

#(let ((endnote-item-list (list)))
	(set! add-endnote-item!
		(lambda (text)
			(set! endnote-item-list
			    (cons (list notenr text) endnote-item-list))))
	(set! endnote-items (lambda () (reverse endnote-item-list))))

#(define-markup-list-command (listofendnotes layout props)()
	"markup endnotes items"
	(space-lines 5
		(interpret-markup-list layout props
			(cons (ly:output-def-lookup layout 'endNotesTitleMarkup)
				(map (lambda (fn)
					(markup #:concat ((number->string (car fn)) ")") #:override '(baseline-skip . 2.5) #:justify-string (cadr fn)))
				(endnote-items))))))

musicEndNote = #(define-music-function (parser location text)(string?)
	(set! notenr (+ notenr 1))
	(begin (add-endnote-item! text))
	(make-music 'TextScriptEvent 'text (markup #:tiny #:concat ((number->string notenr) ")"))))

#(define-markup-command (textEndNote layout props textbefore text)(markup? string?)
	(set! notenr (+ notenr 1))
	(begin (add-endnote-item! text))
	(interpret-markup layout props (markup #:concat (textbefore #:raise 1 #:teeny (number->string notenr)))))


\paper {
	endNotesTitleMarkup = \markup \huge \column {
		\fill-line { \null "Notes" \null }
		\hspace #1
		}
}


%%%%%%%%%%%%%%%%%%%%%%


\bookpart {
	\score {
		\relative c' {
			\musicEndNote #"1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music 1music"
			\repeat unfold 24 { c d e f }
			{ g(^\musicEndNote #"2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music 2music" f e d) } 
			\repeat unfold 23 { c d e f }
			\bar "|."
		}
	}
	\markuplines \justified-lines { \textEndNote "azdfv" #"3text" \textEndNote "ezrtgzsfd" #"4text" }
	\score {
		\relative c' {
			\repeat unfold 10 { c d e f }
			\musicEndNote #"6music"
			\repeat unfold 10 { c d e f }
			\bar "|."
		}
	}
}

\bookpart {
	\markuplines \justified-lines { \textEndNote "azdfv" #"8text" \textEndNote "ezrtgzsfd" #"9text" }
	\score {
		\relative c' {
		\repeat unfold 10 { c d e f }
		\musicEndNote #"7music"
		\repeat unfold 10 { c d e f }
		\bar "|."
		}
	}
}

\markuplines \listofendnotes
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to