]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
d04f5c7e8dfc9cf03466d218db049c3bb68e7081
[lilypond.git] / scm / documentation-generate.scm
1 ;;; generate-documentation.scm -- Generate documentation
2 ;;;
3 ;;; source file of the GNU LilyPond music typesetter
4 ;;; 
5 ;;; (c)  2000--2004 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 ; todo: naming: grob vs. layout property
21
22 (define load-files '("documentation-lib.scm"
23                      "document-functions.scm"
24                      "document-translation.scm"
25                      "document-music.scm"
26                      "document-backend.scm"
27                      "document-markup.scm"
28                      ))
29 (map ly:load load-files)
30
31
32 ;;(define no-copies #t)  ; from 490 to 410K, but doesn't look nice yet
33 ;;
34 ;; Also, copies of interfaces use up lots more space, but that's
35 ;; functional because the default property values of the interfaces
36 ;; are described...
37 (define no-copies #f)
38
39
40
41
42
43
44
45
46
47
48
49
50 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
51
52 (dump-node (all-scheme-functions-doc)
53            (open-output-file "scheme-functions.tely")
54            2)
55
56 (display 
57  (markup-doc-string)
58
59  (open-output-file "markup-commands.tely")
60  )
61
62 (dump-node
63  (make <texi-node>
64    #:name "Layout property overview"
65    #:desc "All user serviceable layout properties"
66    #:text (backend-properties-doc-string all-user-grob-properties))
67
68  (open-output-file "layout-properties.tely")
69  2)
70
71 (dump-node
72  (make <texi-node>
73    #:name "Context property overview"
74    #:desc "All user serviceable context properties"
75    #:text (translation-properties-doc-string all-user-translation-properties))
76  
77  (open-output-file "context-properties.tely")
78  2)
79
80 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
81
82
83 (define file-name "lilypond-internals")
84 (define outname (string-append file-name ".texi"))
85
86
87 (define out-port (open-output-file outname))
88
89 (writing-wip outname)
90
91
92
93
94
95 (display
96  (string-append
97   "@c -*-texinfo-*-"
98   (texi-file-head "LilyPond program-reference" outname "(lilypond-internals.info)")
99   "
100
101 @ifhtml
102 @macro usermanref{NAME}
103 @uref{../lilypond/\\NAME\\.html,\\NAME\\}
104 @cindex \\NAME\\
105 @end macro
106 @end ifhtml
107
108 @ifinfo
109 @macro usermanref{NAME}
110 @inforef{\\NAME\\,,lilypond}
111 @cindex \\NAME\\
112 @end macro
113 @end ifinfo
114
115 @ifhtml
116 @macro glossaryref{NAME}
117 @uref{../music-glossary/\\NAME\\.html,\\NAME\\}
118 @cindex \\NAME\\
119 @end macro
120 @end ifhtml
121
122 @ifinfo
123 @macro glossaryref{NAME}
124 @inforef{\\NAME\\,,music-glossary}
125 @cindex \\NAME\\
126 @end macro
127 @end ifinfo
128
129
130 @macro internalsref{NAME}
131 @ref{\\NAME\\}
132 @end macro
133
134 @ifhtml
135
136 @macro inputfileref{DIR,NAME}
137 @uref{../../../../\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
138 @end macro
139
140 @end ifhtml
141
142 @ifinfo
143
144 @macro inputfileref{DIR,NAME}
145 @file{\\DIR\\/\\NAME\\}
146 @end macro
147
148 @end ifinfo
149
150 @iftex
151 @macro inputfileref{DIR,NAME}@c
152 @file{\\DIR\\/\\NAME\\}@c
153 @end macro
154 @end iftex
155
156
157
158 @ignore
159 @omftitle LilyPond internals
160 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
161 @omfdescription Programmer's reference of the LilyPond music engraving system
162 @omftype user's guide
163 @omflanguage English
164 @omfcategory Applications|Publishing
165 @end ignore
166
167
168 ") out-port)
169
170 (define top-node
171   (make <texi-node>
172     #:name "Top"
173     #:children
174     (list
175      (music-doc-node)
176      (translation-doc-node)
177      (backend-doc-node)
178      (all-scheme-functions-doc)
179      (make <texi-node>
180        #:name "Index"
181        #:text "
182 @unnumbered Concept index
183
184 @printindex cp
185
186 @unnumbered Variable index
187
188 @printindex vr
189
190 @unnumbered Function index
191
192 @printindex fn
193
194 \n@bye"
195
196        
197      )
198     )))
199
200
201 (dump-node top-node out-port 0)
202 (newline (current-error-port))
203
204
205
206