]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
e1f8235784703d0b4a413f5ba3f4e0affa18683f
[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" outname "(lilypond-internals.info)")
67   "
68
69 @ifhtml
70 @macro usermanref{NAME}
71 @uref{../lilypond/\\NAME\\.html,\\NAME\\}
72 @cindex \\NAME\\
73 @end macro
74 @end ifhtml
75
76 @ifinfo
77 @macro usermanref{NAME}
78 @ref{\\NAME\\,,,lilypond/lilypond}
79 @cindex \\NAME\\
80 @end macro
81 @end ifinfo
82
83 @iftex
84 @macro usermanref{NAME}
85 @ref{\\NAME\\}@c
86 @end macro
87 @end iftex
88
89 @ifhtml
90 @macro glossaryref{NAME}
91 @uref{../music-glossary/\\NAME\\.html,\\NAME\\}
92 @cindex \\NAME\\
93 @end macro
94 @end ifhtml
95
96 @ifinfo
97 @macro glossaryref{NAME}
98 @inforef{\\NAME\\,,lilypond/music-glossary}
99 @cindex \\NAME\\
100 @end macro
101 @end ifinfo
102
103
104 @macro internalsref{NAME}
105 @ref{\\NAME\\}
106 @end macro
107
108 @ifhtml
109
110 @macro inputfileref{DIR,NAME}
111 @uref{../../../../\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
112 @end macro
113
114 @end ifhtml
115
116 @ifinfo
117
118 @macro inputfileref{DIR,NAME}
119 @file{\\DIR\\/\\NAME\\}
120 @end macro
121
122 @end ifinfo
123
124 @iftex
125 @macro inputfileref{DIR,NAME}@c
126 @file{\\DIR\\/\\NAME\\}@c
127 @end macro
128 @end iftex
129
130
131
132 @ignore
133 @omftitle LilyPond internals
134 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
135 @omfdescription Programmer's reference of the LilyPond music engraving system
136 @omftype user's guide
137 @omflanguage English
138 @omfcategory Applications|Publishing
139 @end ignore
140
141
142 ") out-port)
143
144 (define top-node
145   (make <texi-node>
146     #:name "Top"
147     #:children
148     (list
149      (music-doc-node)
150      (translation-doc-node)
151      (backend-doc-node)
152      (all-scheme-functions-doc)
153      (make <texi-node>
154        #:name "Index"
155        #:text "
156 @unnumbered Concept index
157
158 @printindex cp
159
160 @unnumbered Variable index
161
162 @printindex vr
163
164 @unnumbered Function index
165
166 @printindex fn
167
168 \n@bye"
169
170        
171      )
172     )))
173
174
175 (dump-node top-node out-port 0)
176 (newline (current-error-port))
177
178
179
180