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 #f)))
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)))
27 (hashq-set! music-types->names cl
29 (hashq-ref music-types->names cl '()))))
35 (define (strip-description x)
36 (cons (symbol->string (car x))
39 (define (music-type-doc entry)
40 (let* ((accept-list (human-listify
43 (map ly:translator-name
46 (engraver-accepts-music-type? (car entry) x))
47 all-engravers-list)))))))
49 #:name (symbol->string (car entry))
52 "\nMusic event type @code{"
53 (symbol->string (car entry))
54 "} is in music objects of type "
57 (map (lambda (x) (ref-ify (symbol->string x)))
58 (cdr entry)) string<?))
62 (if (equal? accept-list "none")
63 "Not accepted by any engraver or performer"
69 (define (music-types-doc)
71 #:name "Music classes"
75 (hash-table->alist music-types->names) alist<?))))
77 (define (music-doc-str obj)
78 (let* ((namesym (car obj))
80 (class (ly:camel-case->lisp-identifier namesym))
81 (classes (ly:make-event-class class))
82 (accept-list (if classes
86 (map ly:translator-name
89 (engraver-accepts-music-types? classes x))
90 all-engravers-list)))))
92 (event-texi (if classes
94 "\n\nEvent classes:\n"
96 (map ref-ify (map symbol->string classes)))
100 (if (equal? accept-list "none")
101 "Not accepted by any engraver or performer"
109 (object-property namesym 'music-description)
112 (description-list->texi
114 (lambda (x) (property->texi 'music x props))
118 (define (music-object-doc obj)
120 #:name (symbol->string (car obj))
121 #:text (music-doc-str obj)))
123 (define (music-expressions-doc)
125 #:name "Music expressions"
126 #:desc "Objects that represent music."
128 (map music-object-doc music-descriptions)))
130 (define (music-doc-node)
132 #:name "Music definitions"
133 #:desc "Definition of the input data structures."
136 (music-expressions-doc)