]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
Docs: Fix internals texi page (macros etc.)
[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 @macro q{TEXT}
77 @quoteleft{}\\TEXT\\@quoteright{}
78 @end macro
79
80 @macro qq{TEXT}
81 @quotedblleft{}\\TEXT\\@quotedblright{}
82 @end macro
83
84
85 @ifhtml
86 @c ***** HTML *****
87
88 @ifset bigpage
89
90 @macro ruser{TEXT}
91 @ref{\\TEXT\\,,,lilypond-big-page,Notation Reference}
92 @cindex \\TEXT\\
93 @end macro
94
95 @macro glossaryref{TEXT}
96 @vindex \\TEXT\\
97 @ref{\\TEXT\\,,,music-glossary-big-page,Music Glossary}
98 @end macro
99
100 @end ifset
101
102 @ifclear bigpage
103
104 @macro ruser{NAME}
105 @ref{\\NAME\\,,,lilypond,Notation Reference}
106 @cindex \\NAME\\
107 @end macro
108
109 @macro glossaryref{NAME}
110 @ref{\\NAME\\,,,music-glossary,Music Glossary}
111 @cindex \\NAME\\
112 @end macro
113
114 @end ifclear
115
116 @macro inputfileref{DIR,NAME}
117 @uref{source/\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
118 @end macro
119
120 @end ifhtml
121
122
123 @ifinfo
124 @c ***** info *****
125
126 @macro ruser{NAME}
127 @ref{\\NAME\\,,,lilypond,Notation Reference}
128 @cindex \\NAME\\
129 @end macro
130
131 @macro glossaryref{NAME}
132 @ref{\\NAME\\,,,music-glossary,Music Glossary}
133 @cindex \\NAME\\
134 @end macro
135
136 @macro inputfileref{DIR,NAME}
137 @file{\\DIR\\/\\NAME\\}
138 @end macro
139
140 @end ifinfo
141
142
143 @iftex
144 @c ***** TeX *****
145
146 @macro ruser{NAME}
147 @ref{\\NAME\\}@c
148 @end macro
149
150 @macro inputfileref{DIR,NAME}@c
151 @file{\\DIR\\/\\NAME\\}@c
152 @end macro
153
154 @end iftex
155
156
157 @macro rinternals{NAME}
158 @ref{\\NAME\\}
159 @end macro
160
161
162 @ignore
163 @omftitle LilyPond internals
164 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
165 @omfdescription Programmer's reference of the LilyPond music engraving system
166 @omftype user's guide
167 @omflanguage English
168 @omfcategory Applications|Publishing
169 @end ignore
170
171 @contents
172 ")
173  out-port)
174
175 (define top-node
176   (make <texi-node>
177     #:name "Top"
178     #:text 
179     (string-append  "This is the program reference for version "
180                     (lilypond-version)
181                     " of LilyPond, the GNU music typesetter.")
182
183     #:children
184     (list
185      (music-doc-node)
186      (translation-doc-node)
187      (backend-doc-node)
188      (all-scheme-functions-doc)
189      (make <texi-node>
190        #:name "Indexes"
191        #:text "
192 @unnumbered Concept index
193
194 @printindex cp
195
196 @unnumbered Function index
197
198 @printindex fn
199
200 \n@bye"))))
201
202 (dump-node top-node out-port 0)
203 (newline (current-error-port))