]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/documentation-lib.scm
doc
[lilypond.git] / scm / documentation-lib.scm
index 02f5a5606372e443112f1e20ff8fa48027ba412b..ba9685ad0a0448f644fe625ca3c4154816047208 100644 (file)
@@ -6,27 +6,6 @@
 ;;; (c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 ;;; Jan Nieuwenhuizen <janneke@gnu.org>
 
-(define (uniqued-alist  alist acc)
-  (if (null? alist) acc
-      (if (assoc (caar alist) acc)
-         (uniqued-alist (cdr alist) acc)
-         (uniqued-alist (cdr alist) (cons (car alist) acc)
-  ))))
-
-(define (uniq-list list)
-  (if (null? list) '()
-      (if (null? (cdr list))
-         list
-         (if (equal? (car list) (cadr list))
-             (uniq-list (cdr list))
-             (cons (car list) (uniq-list (cdr list)))
-  
-  ))))
-
-(define (alist<? x y)
-  (string<? (symbol->string (car x))
-           (symbol->string (car y))))
-
 (define (processing name)
   (display (string-append "\nProcessing " name " ... ") (current-error-port)))
 
@@ -103,10 +82,25 @@ Add a ref if REF is set
    "\n@end table\n"))
 
 (define (texi-menu items-alist)
+  (let
+      (
+       (maxwid (apply max (map (lambda (x) (string-length (car x)))
+                              items-alist)))
+       )
+    
+
+    
   (string-append
   "\n@menu"
   (apply string-append
-        (map (lambda (x) (string-append "\n* " (car x) ":: " (cdr x)))
+        (map (lambda (x)
+               (string-append
+               (pad-string-to 
+                (string-append "\n* " (car x) ":: ")
+                (+ maxwid 8)
+                )
+               (cdr x))
+               )
              items-alist))
   "\n@end menu\n"
   ;; Menus don't appear in html, so we make a list ourselves
@@ -115,7 +109,7 @@ Add a ref if REF is set
   (description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x)))
                         items-alist))
   "\n@end ifhtml\n"
-  "\n@end ignore\n"))
+  "\n@end ignore\n")))
 
   
 (define (texi-node-menu name items-alist)
@@ -124,7 +118,11 @@ Add a ref if REF is set
    (texi-section 1 name #f)
    (texi-menu items-alist)))
 
+
+
 (define (texi-file-head name file-name top items-alist)
+
+  
   (string-append
    "\\input texinfo @c -*-texinfo-*-"
    "\n@setfilename " file-name ".info"
@@ -151,6 +149,7 @@ Add a ref if REF is set
    "\n@contents"
    ))
 
+
 (define (context-name name)
   name)
 
@@ -158,7 +157,9 @@ Add a ref if REF is set
   name)
 
 (define (grob-name name)
-  name)
+  (if (symbol? name)
+      (symbol->string name)
+      name))
 
 (define (interface-name name)
   name)