]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
texi2html: Use an appendix for indices in IR
[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 @end ifset
96
97 @ifclear bigpage
98
99 @macro ruser{NAME}
100 @ref{\\NAME\\,,,lilypond,Notation Reference}
101 @cindex \\NAME\\
102 @end macro
103
104 @end ifclear
105
106 @macro inputfileref{DIR,NAME}
107 @uref{source/\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
108 @end macro
109
110 @end ifhtml
111
112
113 @ifinfo
114 @c ***** info *****
115
116 @macro ruser{NAME}
117 @ref{\\NAME\\,,,lilypond,Notation Reference}
118 @cindex \\NAME\\
119 @end macro
120
121 @macro inputfileref{DIR,NAME}
122 @file{\\DIR\\/\\NAME\\}
123 @end macro
124
125 @end ifinfo
126
127
128 @iftex
129 @c ***** TeX *****
130
131 @macro ruser{NAME}
132 @ref{\\NAME\\}@c
133 @end macro
134
135 @macro inputfileref{DIR,NAME}@c
136 @file{\\DIR\\/\\NAME\\}@c
137 @end macro
138
139 @end iftex
140
141
142 @macro rinternals{NAME}
143 @ref{\\NAME\\}
144 @end macro
145
146
147 @ignore
148 @omftitle LilyPond internals
149 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
150 @omfdescription Programmer's reference of the LilyPond music engraving system
151 @omftype user's guide
152 @omflanguage English
153 @omfcategory Applications|Publishing
154 @end ignore
155
156
157 ")
158  out-port)
159
160 (define top-node
161   (make <texi-node>
162     #:name "Top"
163     #:text 
164     (string-append  "This is the program reference for version "
165                     (lilypond-version)
166                     " of LilyPond, the GNU music typesetter.")
167
168     #:children
169     (list
170      (music-doc-node)
171      (translation-doc-node)
172      (backend-doc-node)
173      (all-scheme-functions-doc)
174      (make <texi-node>
175        #:appendix #t
176        #:name "Indices"
177        #:text "
178 @appendixsec Concept index
179
180 @printindex cp
181
182 @appendixsec Function index
183
184 @printindex fn
185
186 \n@bye"))))
187
188 (dump-node top-node out-port 0)
189 (newline (current-error-port))