(cons (string-append "@code{" name "} "
"(" typename ")"
- ":" )
+ ": "
+
+; index gets too messy
+; "@vindex " name "\n"
+
+
+ )
desc)))
-(define (document-grob-property sym grob-description only-doc-if-set)
+(define (document-grob-property sym grob-description )
(let* ((handle (assoc sym grob-description))
(defval (if (eq? handle #f)
- ""
+ "(unset)"
(scm->texi (cdr handle))))
(propdoc (backend-property->texi sym)))
- (if (and only-doc-if-set (eq? handle #f))
- '("" . "")
- (cons (car propdoc) (string-append (cdr propdoc)
+ (cons (car propdoc) (string-append (cdr propdoc)
"\nDefault value: "
- defval)))))
+ defval))))
(define (document-interface where interface grob-description)
(let* ((level (if (eq? where 'grob) 3 2))
(props (caddr interface))
(docfunc (lambda (x)
(document-grob-property
- x grob-description (eq? where 'grob))))
+ x grob-description )))
(docs (map docfunc props)))
(string-append
engraver-description-alist))))
(string-append
name " grobs are created by: "
- (human-listify (map reffy
+ (human-listify (map ref-ify
(map engraver-name
(map symbol->string engravers))))))
(string-append
"\n" (cdr (assoc level texi-section-alist)) " "
(if ref
- (string-append "@ref{" name "}")
+ (ref-ify name)
name)
"\n"))
;; Menus don't appear in html, so we make a list ourselves
"\n@ignore\n"
"\n@ifhtml\n"
- (description-list->texi (map (lambda (x) (cons (reffy (car x)) (cdr x)))
+ (description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x)))
items-alist))
"\n@end ifhtml\n"
"\n@end ignore\n"))
))
(define (context-name name)
- (string-append "Context " name))
+ name)
(define (engraver-name name)
name)
(define (grob-name name)
- (string-append "Grob " name))
+ name)
(define (interface-name name)
name)
-(define (reffy x)
+(define (ref-ify x)
(string-append "@ref{" x "}"))
(define (human-listify l)
(if (null? objs)
""
(string-append
- "This engraver creates \n "
- (human-listify (map reffy (map grob-name objs)))
- " grobs.")
+ "This engraver creates the following grobs: \n "
+ (human-listify (map ref-ify objs))
+ ".")
)
"\n\n"
context-description-alist))))
(string-append
name " is part of contexts: "
- (human-listify (map reffy (map context-name contexts))))))))
+ (human-listify (map ref-ify (map context-name contexts))))))))
;; First level Engraver description
(cdr (assoc 'consists context-desc))
(cdr (assoc 'end-consists context-desc))
))
+ (grobs (context-grobs context-desc))
+ (grob-refs (map (lambda (x) (ref-ify x)) grobs))
)
(string-append
desc
+ "\n\nThis context creates the following grobs: \n\n"
+ (apply string-append (map (lambda (x) (string-append " " x " ")) grob-refs))
+ "."
(if (null? accepts)
"This context is a `bottom' context; it can not contain other contexts."
(string-append
+ "\n\nContext "
name " can contain \n"
- (human-listify (map reffy (map context-name accepts)))))
+ (human-listify (map ref-ify (map context-name accepts)))))
"\n\nThis context is built from the following engravers: "
(if no-copies
- (human-listify (map reffy (map engraver-name consists)))
+ (human-listify (map ref-ify (map engraver-name consists)))
(apply string-append
(map document-engraver-by-name consists))))))
+(define (engraver-grobs name)
+ (let* (
+ (eg (assoc (string->symbol name) engraver-description-alist))
+ )
+
+ (if (eq? eg #f)
+ '()
+ (map symbol->string (caddr (cdr eg)))
+ )
+ ))
+
+(define (context-grobs context-desc)
+ (let* (
+ (consists (append
+ (list (cdr (assoc 'group-type context-desc)))
+ (cdr (assoc 'consists context-desc))
+ (cdr (assoc 'end-consists context-desc))
+ ))
+ (grobs (apply append
+ (map engraver-grobs consists))
+ )
+ )
+ grobs
+ ))
+
;; First level Context description
(define (document-context top context-desc)