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