-;;; engraver-doumentation-lib.scm -- Functions for engraver documentation
-;;;
-;;; source file of the GNU LilyPond music typesetter
-;;;
-;;; (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;; Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; document-translation.scm -- Functions for engraver documentation
+;;;;
+;;;; source file of the GNU LilyPond music typesetter
+;;;;
+;;;; (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; Jan Nieuwenhuizen <janneke@gnu.org>
(define (engraver-makes-grob? name-symbol grav)
(if (null? grobs)
""
(string-append
- "This engraver creates the following grobs: \n "
+ "This engraver creates the following layout objects: \n "
(human-listify (map ref-ify (uniq-list (sort grobs string<? ))))
".")
)
(if in-which-contexts
(let*
- ((paper-alist (My_lily_parser::paper_description))
+ ((paper-alist (ly:output-description $defaultpaper))
(context-description-alist (map cdr paper-alist))
(contexts
(apply append
(lambda (x)
(let*
((context (cdr (assoc 'context-name x)))
+ (group (assq-ref x 'group-type))
(consists (append
- (list
- (cdr (assoc 'group-type x)))
+ (if group
+ (list group)
+ '())
(cdr (assoc 'consists x))
))
'())))
context-description-alist))))
(string-append
- name-str " is part of contexts: "
- (human-listify (map ref-ify (map symbol->string contexts)))))
+ "@code{" name-str "} is part of contexts: "
+ (human-listify (map ref-ify
+ (sort
+ (map symbol->string contexts) string<?)))))
""
))))
))
;; Second level, part of Context description
-
(define name->engraver-table (make-vector 61 '()))
(map
(lambda (x)
(eg (find-engraver-by-name name ))
)
- (cons (symbol->string name )
+ (cons (string-append "@code{" (ref-ify (symbol->string name)) "}")
(engraver-doc-string eg #f)
)
))
(cdr desc-handle) "(not documented)"))
(accepts (cdr (assoc 'accepts context-desc)))
+ (group (assq-ref context-desc 'group-type))
+
(consists (append
- (list (cdr (assoc 'group-type context-desc)))
+ (if group (list group)
+ '())
(cdr (assoc 'consists context-desc))
))
(props (cdr (assoc 'property-ops context-desc)))
#:text
(string-append
desc
- "\n\n This context is also known as: \n\n"
- (human-listify aliases)
- "\n\nThis context creates the following grobs: \n\n"
+ (if (pair? aliases)
+ (string-append "\n\n This context is also known as: \n\n"
+ (human-listify aliases))
+ "")
+ "\n\nThis context creates the following layout objects: \n\n"
(human-listify (uniq-list (sort grob-refs string<? )))
"."
(if (pair? props)
"\n\nThis context is built from the following engravers: "
(description-list->texi
- (map document-engraver-by-name consists))
+ (map document-engraver-by-name consists))
))))
-(define (engraver-grobs grav)
+(define (engraver-grobs grav)
(let* ((eg (if (symbol? grav)
(find-engraver-by-name grav)
grav)))
-
(if (eq? eg #f)
'()
(map symbol->string (cdr (assoc 'grobs-created (ly:translator-description eg)))))
))
(define (context-grobs context-desc)
- (let* ((consists (append
- (list (cdr (assoc 'group-type context-desc)))
+ (let* (
+ (group (assq-ref context-desc 'group-type))
+ (consists (append
+ (if group
+ (list group)
+ '())
(cdr (assoc 'consists context-desc))
))
(grobs (apply append
(define (all-contexts-doc)
(let* (
(paper-alist
- (sort (My_lily_parser::paper_description)
+ (sort (ly:output-description $defaultpaper)
(lambda (x y) (symbol<? (car x) (car y)))))
(names (sort (map symbol->string (map car paper-alist)) string<?))
(contexts (map cdr paper-alist))
(make <texi-node>
#:name "Engravers"
#:desc "All separate engravers"
+ #:text "See @usermanref{Modifying context plug-ins}."
#:children
(map engraver-doc all-engravers-list)))