]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-lib.scm
Adds automatic numbering to footnotes.
[lilypond.git] / scm / output-lib.scm
index 5d4bdb1b617a1cc4b962eb7e8c6d27de5e554fa3..025590e5bae0e001db8f089a96b811485faa1198 100644 (file)
@@ -467,6 +467,25 @@ and duration-log @var{log}."
        (+ c0 p))))
 
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; annotations
+
+(define-public (numbered-footnotes int)
+  (markup #:tiny (number->string (+ 1 int))))
+
+(define-public (symbol-footnotes int)
+  (define (helper symbols out idx n)
+    (if (< n 1)
+        out
+        (helper symbols
+                (string-append out (list-ref symbols idx))
+                idx
+                (- n 1))))
+  (markup #:tiny (helper '("*" "†" "‡" "§" "¶")
+                          ""
+                          (remainder int 5)
+                          (+ 1 (quotient int 5)))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; accidentals