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