]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/documentation-lib.scm
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / scm / documentation-lib.scm
index 5a0afbbf34c51d5d4cbf2aef69570db4a190a008..4cf5f390e32be50ac65092a69ba17330f0df08f2 100644 (file)
@@ -3,7 +3,7 @@
 ;;;;
 ;;;; source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 2000--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 2000--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 
 (use-modules (oop goops)
                      (5 . "@unnumberedsubsubsec")))))
 
 (define (one-item->texi label-desc-pair)
-  "Document one (LABEL . DESC); return empty string if LABEL is empty string. 
-"
+  "Document one (LABEL . DESC); return empty string if LABEL is empty string."
   (if (eq? (car label-desc-pair) "")
       ""
       (string-append "\n@item " (car label-desc-pair) "\n" (cdr label-desc-pair))))
 
 
-(define (description-list->texi items-alist)
-  "Document ITEMS-ALIST in a table. entries contain (item-label
-. string-to-use)
-"
+(define (description-list->texi items-alist quote?)
+  "Document ITEMS-ALIST in a table; entries contain (item-label .
+string-to-use).  If QUOTE? is #t, embed table in a @quotation environment."
   (string-append
-   "\n@table @asis\n"
+   "\n"
+   (if quote? "@quotation\n" "")
+   "@table @asis\n"
    (apply string-append (map one-item->texi items-alist))
-   "\n@end table\n"))
+   "\n"
+   "@end table\n"
+   (if quote? "@end quotation\n" "")))
 
 (define (texi-menu items-alist)
   "Generate what is between @menu and @end menu."
      "\n@ignore\n"
      "\n@ifhtml\n"
      (description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x)))
-                                 items-alist))
+                                 items-alist)
+                            #t)
      "\n@end ifhtml\n"
      "\n@end ignore\n")))