]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into dev...
[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--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
7
8 ;;; File entry point for generated documentation
9 ;;; Running LilyPond on this file generates the documentation
10
11 ;;(set-debug-cell-accesses! 5000)
12
13 ;;;;;;;;;;;;;;;;
14 ;;;;;;;;;;;;;;;; TODO : make modules of these!
15 ;;;;;;;;;;;;;;;;
16
17 ;; todo: naming: grob vs. layout property
18
19 (map ly:load '("documentation-lib.scm"
20                "document-functions.scm"
21                "document-translation.scm"
22                "document-music.scm"
23                "document-identifiers.scm"
24                "document-backend.scm"
25                "document-markup.scm"))
26
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28
29 (display
30  (slot-ref (all-scheme-functions-doc) 'text)
31  (open-output-file "scheme-functions.tely"))
32
33 ;;(display 
34 ;; (markup-doc-string)
35 ;; (open-output-file "markup-commands.tely"))
36
37 (call-with-output-file "markup-commands.tely"
38   (lambda (port)
39     (dump-node (markup-doc-node) port 2 #t)))
40
41 (call-with-output-file "markup-list-commands.tely"
42   (lambda (port)
43     (dump-node (markup-list-doc-node) port 2 #t)))
44
45 (display 
46  (identifiers-doc-string)
47  (open-output-file "identifiers.tely"))
48
49
50 (display
51  (backend-properties-doc-string all-user-grob-properties)
52  (open-output-file "layout-properties.tely"))
53
54 (display
55  (translation-properties-doc-string all-user-translation-properties)
56  (open-output-file "context-properties.tely"))
57
58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
59
60 (define file-name "lilypond-internals")
61 (define outname (string-append file-name ".texi"))
62
63 (define out-port (open-output-file outname))
64
65 (writing-wip outname)
66
67 (display
68  (string-append
69   (texi-file-head "LilyPond program-reference" file-name
70                   "(lilypond/lilypond-internals.info)")
71   "
72
73 @c NOTE: This is documentation-generate.scm, not macros.itexi
74
75
76 @ifhtml
77 @c ***** HTML *****
78
79 @ifset bigpage
80
81 @macro ruser{TEXT}
82 @ref{\\TEXT\\,,,lilypond-big-page,Notation Reference}
83 @cindex \\TEXT\\
84 @end macro
85
86 @macro glossaryref{TEXT}
87 @vindex \\TEXT\\
88 @ref{\\TEXT\\,,,music-glossary-big-page,Music Glossary}
89 @end macro
90
91 @end ifset
92
93 @ifclear bigpage
94
95 @macro ruser{NAME}
96 @ref{\\NAME\\,,,lilypond,Notation Reference}
97 @cindex \\NAME\\
98 @end macro
99
100 @macro glossaryref{NAME}
101 @ref{\\NAME\\,,,music-glossary,Music Glossary}
102 @cindex \\NAME\\
103 @end macro
104
105 @end ifclear
106
107 @macro inputfileref{DIR,NAME}
108 @uref{source/\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
109 @end macro
110
111 @macro q{TEXT}
112 @html
113 &lsquo;\\TEXT\\&rsquo;
114 @end html
115 @end macro
116 @end ifhtml
117
118
119 @ifinfo
120 @c ***** info *****
121
122 @macro ruser{NAME}
123 @inforef{\\NAME\\,,,lilypond}
124 @cindex \\NAME\\
125 @end macro
126
127 @macro glossaryref{NAME}
128 @inforef{\\NAME\\,,lilypond/music-glossary}
129 @cindex \\NAME\\
130 @end macro
131
132 @macro inputfileref{DIR,NAME}
133 @file{\\DIR\\/\\NAME\\}
134 @end macro
135
136 @macro q{TEXT}
137 `\\TEXT\\'
138 @end macro
139 @end ifinfo
140
141
142 @iftex
143 @c ***** TeX *****
144
145 @macro ruser{NAME}
146 @ref{\\NAME\\}@c
147 @end macro
148
149 @macro inputfileref{DIR,NAME}@c
150 @file{\\DIR\\/\\NAME\\}@c
151 @end macro
152
153 @macro q{TEXT}
154 `\\TEXT\\'
155 @end macro
156 @end iftex
157
158
159 @macro rinternals{NAME}
160 @ref{\\NAME\\}
161 @end macro
162
163
164 @ignore
165 @omftitle LilyPond internals
166 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
167 @omfdescription Programmer's reference of the LilyPond music engraving system
168 @omftype user's guide
169 @omflanguage English
170 @omfcategory Applications|Publishing
171 @end ignore
172
173 @contents
174 ")
175  out-port)
176
177 (define top-node
178   (make <texi-node>
179     #:name "Top"
180     #:text 
181     (string-append  "This is the program reference for version "
182                     (lilypond-version)
183                     " of LilyPond, the GNU music typesetter.")
184
185     #:children
186     (list
187      (music-doc-node)
188      (translation-doc-node)
189      (backend-doc-node)
190      (all-scheme-functions-doc)
191      (make <texi-node>
192        #:name "Indexes"
193        #:text "
194 @unnumbered Concept index
195
196 @printindex cp
197
198 @unnumbered Function index
199
200 @printindex fn
201
202 \n@bye"))))
203
204 (dump-node top-node out-port 0)
205 (newline (current-error-port))