1 ;;;; document-markup.scm -- part of generated backend documentation
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2007 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<?))
56 (map ly:translator-name
58 (lambda (x) (engraver-accepts-music-type? (car entry) x)) all-engravers-list)))))
62 (define (music-types-doc)
64 #:name "Music classes"
68 (hash-table->alist music-types->names) alist<?))))
70 (define (music-doc-str obj)
71 (let* ((namesym (car obj))
73 (class (ly:camel-case->lisp-identifier namesym))
74 (classes (ly:make-event-class class))
75 (event-texi (if classes
77 "\n\nEvent classes:\n"
78 (human-listify (map ref-ify (map symbol->string classes)))
84 (map symbol->string (map ly:translator-name
86 (lambda (x) (engraver-accepts-music-types? classes x)) all-engravers-list)))))
91 (object-property namesym 'music-description)
94 (description-list->texi
96 (lambda (x) (property->texi 'music x props))
99 (define (music-object-doc obj)
101 #:name (symbol->string (car obj))
102 #:text (music-doc-str obj)))
104 (define (music-expressions-doc)
106 #:name "Music expressions"
107 #:desc "Objects that represent music."
109 (map music-object-doc music-descriptions)))
111 (define (music-doc-node)
113 #:name "Music definitions"
114 #:desc "Definition of the input data structures."
117 (music-expressions-doc)