From 4ed502a165b3c9a1a65b4632b1e6db91c9655848 Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Mon, 1 Aug 2011 23:39:35 +0200 Subject: [PATCH] Users make-null-markup to construct footnotes. Also adds better descriptive text and removes vestigial functions from scm/lily-library.scm. --- .../footnote-auto-numbering-page-reset.ly | 7 ++++++- input/regression/footnote-auto-numbering.ly | 6 +++++- ly/music-functions-init.ly | 4 ++-- scm/lily-library.scm | 17 ----------------- 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/input/regression/footnote-auto-numbering-page-reset.ly b/input/regression/footnote-auto-numbering-page-reset.ly index 06a347ebda..dc3fa468b5 100644 --- a/input/regression/footnote-auto-numbering-page-reset.ly +++ b/input/regression/footnote-auto-numbering-page-reset.ly @@ -1,6 +1,11 @@ \version "2.15.7" \header { - texidoc = "Lilypond does footnotes." + texidoc = "This is an example of automatic footnote numbering +where the number is reset on each page. It uses the symbol-footnotes +numbering function, which assigns the symbols *, †, ‡, § and ¶ to +successive footnotes, doubling up on the symbol after five footnotes +have been reached. +" } \paper { diff --git a/input/regression/footnote-auto-numbering.ly b/input/regression/footnote-auto-numbering.ly index fe4babe1a0..3c0b410956 100644 --- a/input/regression/footnote-auto-numbering.ly +++ b/input/regression/footnote-auto-numbering.ly @@ -1,6 +1,10 @@ \version "2.15.7" \header { - texidoc = "Lilypond does footnotes." + texidoc = "This is an example of automatic footnote numbering +where the number is not reset on each page. It uses the default +numbering function, which assigns numbers starting at 1 to successive +footnotes. +" } \paper { diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 3535a0a6a7..2278f85a26 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -361,7 +361,7 @@ the number appears at @var{offset}. Note that, for this to take effect, auto-numbering must be turned on in the paper block. Otherwise, no number will appear. Use like @code{\\once})") #{ - \footnoteGrob $grob-name $offset \markup { "" } $footnote + \footnoteGrob $grob-name $offset \markup { \null } $footnote #}) footnote = @@ -389,7 +389,7 @@ Otherwise, no number will appear. Use like @code{\\tweak})") (make-music 'FootnoteEvent 'X-offset (car offset) 'Y-offset (cdr offset) - 'text (markup "") + 'text (make-null-markup) 'footnote-text footnote)) grace = diff --git a/scm/lily-library.scm b/scm/lily-library.scm index 34c9cb3820..ede65ff5e2 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -746,23 +746,6 @@ Handy for debugging, possibly turned off." (reverse matches)) -(define-public (random-string pool n) - "Produces a random lowercase string of length n" - (define (helper alphabet out num) - (let ((rand (random (string-length pool)))) - (if (< num 1) - out - (helper alphabet - (string-concatenate `(,out - ,(substring alphabet - rand - (+ 1 rand)))) - (- num 1))))) - (helper pool "" n)) - -(define-public (random-lowercase-string n) - (random-string "abcdefghijklmnopqrstuvwxyz" n)) - ;;;;;;;;;;;;;;;; ;; other -- 2.39.5