1 ;;;; document-markup.scm -- part of generated backend documentation
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 (define (music-props-doc)
10 #:name "Music properties"
11 #:desc "All music properties, including descriptions"
13 (let* ((ps (sort (map symbol->string all-music-properties) string<?))
14 (descs (map (lambda (prop)
15 (property->texi 'music (string->symbol prop)))
17 (texi (description-list->texi descs)))
20 (define music-types->names (make-vector 61 '()))
21 (filter-map (lambda (entry)
22 (let* ((class (ly:camel-case->lisp-identifier (car entry)))
23 (classes (ly:make-event-class class)))
26 (hashq-set! music-types->names cl
28 (hashq-ref music-types->names cl '()))))
34 (define (strip-description x)
35 (cons (symbol->string (car x))
38 (define (music-type-doc entry)
40 #:name (symbol->string (car entry))
43 "\nMusic event type @code{"
44 (symbol->string (car entry))
45 "} is in Music objects of type "
48 (map (lambda (x) (ref-ify (symbol->string x)))
49 (cdr entry)) string<?))
55 (map ly:translator-name
57 (lambda (x) (engraver-accepts-music-type? (car entry) x)) all-engravers-list)))))
60 (define (music-types-doc)
62 #:name "Music classes"
66 (hash-table->alist music-types->names) alist<?))))
68 (define (music-doc-str obj)
69 (let* ((namesym (car obj))
71 (class (ly:camel-case->lisp-identifier namesym))
72 (classes (ly:make-event-class class))
73 (event-texi (if classes
75 "\n\nEvent classes:\n"
76 (human-listify (map ref-ify (map symbol->string classes)))
81 (map symbol->string (map ly:translator-name
83 (lambda (x) (engraver-accepts-music-types? classes x)) all-engravers-list))))))
87 (object-property namesym 'music-description)
90 (description-list->texi
92 (lambda (x) (property->texi 'music x props))
95 (define (music-object-doc obj)
97 #:name (symbol->string (car obj))
98 #:text (music-doc-str obj)))
100 (define (music-expressions-doc)
102 #:name "Music expressions"
103 #:desc "Objects that represent music."
105 (map music-object-doc music-descriptions)))
107 (define (music-doc-node)
109 #:name "Music definitions"
110 #:desc "Definition of the Input data structures"
113 (music-expressions-doc)