]> 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 @ref{\\NAME\\,,,lilypond}
124 @cindex \\NAME\\
125 @end macro
126
127 @macro inputfileref{DIR,NAME}
128 @file{\\DIR\\/\\NAME\\}
129 @end macro
130
131 @macro q{TEXT}
132 `\\TEXT\\'
133 @end macro
134 @end ifinfo
135
136
137 @iftex
138 @c ***** TeX *****
139
140 @macro ruser{NAME}
141 @ref{\\NAME\\}@c
142 @end macro
143
144 @macro inputfileref{DIR,NAME}@c
145 @file{\\DIR\\/\\NAME\\}@c
146 @end macro
147
148 @macro q{TEXT}
149 `\\TEXT\\'
150 @end macro
151 @end iftex
152
153
154 @macro rinternals{NAME}
155 @ref{\\NAME\\}
156 @end macro
157
158
159 @ignore
160 @omftitle LilyPond internals
161 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
162 @omfdescription Programmer's reference of the LilyPond music engraving system
163 @omftype user's guide
164 @omflanguage English
165 @omfcategory Applications|Publishing
166 @end ignore
167
168 @contents
169 ")
170  out-port)
171
172 (define top-node
173   (make <texi-node>
174     #:name "Top"
175     #:text 
176     (string-append  "This is the program reference for version "
177                     (lilypond-version)
178                     " of LilyPond, the GNU music typesetter.")
179
180     #:children
181     (list
182      (music-doc-node)
183      (translation-doc-node)
184      (backend-doc-node)
185      (all-scheme-functions-doc)
186      (make <texi-node>
187        #:name "Indexes"
188        #:text "
189 @unnumbered Concept index
190
191 @printindex cp
192
193 @unnumbered Function index
194
195 @printindex fn
196
197 \n@bye"))))
198
199 (dump-node top-node out-port 0)
200 (newline (current-error-port))