]> git.donarmstrong.com Git - lilypond.git/blob - scm/generate-documentation.scm
860301dd6883515c1b27818716dc846c5f848fee
[lilypond.git] / scm / generate-documentation.scm
1 ;;; generate-documentation.scm -- Generate documentation
2 ;;;
3 ;;; source file of the GNU LilyPond music typesetter
4 ;;; 
5 ;;; (c) 2000--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;; Jan Nieuwenhuizen <janneke@gnu.org>
7
8 ;;; File entry point for generated documentation
9
10 ;;; Running LilyPond on this file generates the documentation
11
12 (debug-enable 'debug)
13 (debug-enable 'backtrace)
14 (read-enable 'positions)
15
16 ;;;;;;;;;;;;;;;;
17 ;;;;;;;;;;;;;;;; TODO : make modules of these!
18 ;;;;;;;;;;;;;;;;
19
20 (define load-files '("documentation-lib.scm"
21                      "function-documentation.scm"
22                      "engraver-documentation-lib.scm"
23                      "music-documentation-lib.scm"
24                      "backend-documentation-lib.scm"
25                      ))
26 (map load-from-path load-files)
27
28
29 ;;(define no-copies #t)  ; from 490 to 410K, but doesn't look nice yet
30 ;;
31 ;; Also, copies of interfaces use up lots more space, but that's
32 ;; functional because the default property values of the interfaces
33 ;; are described...
34 (define no-copies #f)
35
36 (let* ((doc (string-append
37              (document-music "Music properties") 
38              (document-paper "Contexts")
39              (document-all-engravers "Engravers")
40              (document-all-engraver-properties "Context properties")
41              (document-all-grobs "Grob overview")
42              (document-all-interfaces "Interfaces")
43
44              (node "Backend properties")
45              (texi-section 1 "Backend properties" #f)
46
47              (document-all-backend-properties "Backend properties")
48
49              (node "Function documentation")
50              (texi-section 1 "Function documentation" #f)
51
52              (document-all-scheme-functions)
53              
54              )
55        )
56        (name "lilypond-internals")
57        (outname (string-append name ".texi"))
58        (out (open-output-file outname)))
59
60   (writing-wip outname)
61   (display 
62    (string-append
63     (texi-file-head
64      
65      ;; we can't use (dir) and top if we're included by lilypond.tely
66      "LilyPond internals" name "(lilypond.info)"
67      '(
68        ("Music properties" . "properties for Music representation")
69        ("Contexts" . "Hierarchy and grouping of Engravers")
70        ("Engravers" . "Engravers create Grobs")
71        ("Context properties" . "context properties")       
72        ("Grob overview" . "Detailed description of all Grobs")
73        ("Interfaces" . "Grob Interfaces")
74        ("Backend properties" . "Grob properties")
75        ("Function documentation" . "All embedded functions")
76        ("Index" . "index")
77        ))
78
79     
80     
81     doc
82
83     "@node Index
84 @unnumbered Concept index
85
86 @printindex cp
87
88 @unnumbered Variable index
89
90 @printindex vr
91
92 @unnumbered Function index
93
94 @printindex fn
95
96 "
97
98     
99     "\n@bye")
100    out))
101
102 (newline (current-error-port))