]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
* scm/page-layout.scm (default-page-make-stencil): whoops. Add
[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
33 (display
34  (slot-ref (all-scheme-functions-doc) 'text)
35  (open-output-file "scheme-functions.tely"))
36
37 (display 
38  (markup-doc-string)
39  (open-output-file "markup-commands.tely"))
40
41
42 (display
43  (backend-properties-doc-string all-user-grob-properties)
44  (open-output-file "layout-properties.tely") )
45
46 (display
47  (translation-properties-doc-string all-user-translation-properties)
48  (open-output-file "context-properties.tely") )
49 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
50
51
52 (define file-name "lilypond-internals")
53 (define outname (string-append file-name ".texi"))
54
55
56 (define out-port (open-output-file outname))
57
58 (writing-wip outname)
59
60
61
62
63
64 (display
65  (string-append
66   (texi-file-head "LilyPond program-reference" file-name
67                   "(lilypond-internals.info)")
68   "
69
70 @ifhtml
71 @macro usermanref{NAME}
72 @uref{../lilypond/\\NAME\\.html,\\NAME\\}
73 @cindex \\NAME\\
74 @end macro
75 @end ifhtml
76
77 @ifinfo
78 @macro usermanref{NAME}
79 @ref{\\NAME\\,,,lilypond/lilypond}
80 @cindex \\NAME\\
81 @end macro
82 @end ifinfo
83
84 @iftex
85 @macro usermanref{NAME}
86 @ref{\\NAME\\}@c
87 @end macro
88 @end iftex
89
90 @ifhtml
91 @macro glossaryref{NAME}
92 @uref{../music-glossary/\\NAME\\.html,\\NAME\\}
93 @cindex \\NAME\\
94 @end macro
95 @end ifhtml
96
97 @ifinfo
98 @macro glossaryref{NAME}
99 @inforef{\\NAME\\,,lilypond/music-glossary}
100 @cindex \\NAME\\
101 @end macro
102 @end ifinfo
103
104
105 @macro internalsref{NAME}
106 @ref{\\NAME\\}
107 @end macro
108
109 @ifhtml
110
111 @macro inputfileref{DIR,NAME}
112 @uref{../../../../\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
113 @end macro
114
115 @end ifhtml
116
117 @ifinfo
118
119 @macro inputfileref{DIR,NAME}
120 @file{\\DIR\\/\\NAME\\}
121 @end macro
122
123 @end ifinfo
124
125 @iftex
126 @macro inputfileref{DIR,NAME}@c
127 @file{\\DIR\\/\\NAME\\}@c
128 @end macro
129 @end iftex
130
131
132
133 @ignore
134 @omftitle LilyPond internals
135 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
136 @omfdescription Programmer's reference of the LilyPond music engraving system
137 @omftype user's guide
138 @omflanguage English
139 @omfcategory Applications|Publishing
140 @end ignore
141
142
143 "
144
145
146   ) out-port)
147
148 (define top-node
149   (make <texi-node>
150     #:name "Top"
151     #:text 
152     (string-append  "This is the program reference for LilyPond version " (lilypond-version))
153
154     #:children
155     (list
156      (music-doc-node)
157      (translation-doc-node)
158      (backend-doc-node)
159      (all-scheme-functions-doc)
160      (make <texi-node>
161        #:name "Index"
162        #:text "
163 @unnumbered Concept index
164
165 @printindex cp
166
167 @unnumbered Variable index
168
169 @printindex vr
170
171 @unnumbered Function index
172
173 @printindex fn
174
175 \n@bye"
176
177        
178      )
179     )))
180
181
182 (dump-node top-node out-port 0)
183 (newline (current-error-port))
184
185
186
187