]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
(usermanref): Add macro for TeX.
[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 ;;(define no-copies #t)  ; from 490 to 410K, but doesn't look nice yet
33 ;;
34 ;; Also, copies of interfaces use up lots more space, but that's
35 ;; functional because the default property values of the interfaces
36 ;; are described...
37 (define no-copies #f)
38
39
40
41
42
43
44
45
46
47
48
49
50 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
51
52 (dump-node (all-scheme-functions-doc)
53            (open-output-file "scheme-functions.tely")
54            2)
55
56 (display 
57  (markup-doc-string)
58
59  (open-output-file "markup-commands.tely")
60  )
61
62 (dump-node
63  (make <texi-node>
64    #:name "Layout property overview"
65    #:desc "All user serviceable layout properties"
66    #:text (backend-properties-doc-string all-user-grob-properties))
67
68  (open-output-file "layout-properties.tely")
69  2)
70
71 (dump-node
72  (make <texi-node>
73    #:name "Context property overview"
74    #:desc "All user serviceable context properties"
75    #:text (translation-properties-doc-string all-user-translation-properties))
76  
77  (open-output-file "context-properties.tely")
78  2)
79
80 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
81
82
83 (define file-name "lilypond-internals")
84 (define outname (string-append file-name ".texi"))
85
86
87 (define out-port (open-output-file outname))
88
89 (writing-wip outname)
90
91
92
93
94
95 (display
96  (string-append
97   (texi-file-head "LilyPond program-reference" outname "(lilypond-internals.info)")
98   "
99
100 @ifhtml
101 @macro usermanref{NAME}
102 @uref{../lilypond/\\NAME\\.html,\\NAME\\}
103 @cindex \\NAME\\
104 @end macro
105 @end ifhtml
106
107 @ifinfo
108 @macro usermanref{NAME}
109 @inforef{\\NAME\\,,lilypond}
110 @cindex \\NAME\\
111 @end macro
112 @end ifinfo
113
114 @iftex
115 @macro usermanref{NAME}
116 @ref{\\NAME\\}@c
117 @end macro
118 @end iftex
119
120 @ifhtml
121 @macro glossaryref{NAME}
122 @uref{../music-glossary/\\NAME\\.html,\\NAME\\}
123 @cindex \\NAME\\
124 @end macro
125 @end ifhtml
126
127 @ifinfo
128 @macro glossaryref{NAME}
129 @inforef{\\NAME\\,,music-glossary}
130 @cindex \\NAME\\
131 @end macro
132 @end ifinfo
133
134
135 @macro internalsref{NAME}
136 @ref{\\NAME\\}
137 @end macro
138
139 @ifhtml
140
141 @macro inputfileref{DIR,NAME}
142 @uref{../../../../\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
143 @end macro
144
145 @end ifhtml
146
147 @ifinfo
148
149 @macro inputfileref{DIR,NAME}
150 @file{\\DIR\\/\\NAME\\}
151 @end macro
152
153 @end ifinfo
154
155 @iftex
156 @macro inputfileref{DIR,NAME}@c
157 @file{\\DIR\\/\\NAME\\}@c
158 @end macro
159 @end iftex
160
161
162
163 @ignore
164 @omftitle LilyPond internals
165 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
166 @omfdescription Programmer's reference of the LilyPond music engraving system
167 @omftype user's guide
168 @omflanguage English
169 @omfcategory Applications|Publishing
170 @end ignore
171
172
173 ") out-port)
174
175 (define top-node
176   (make <texi-node>
177     #:name "Top"
178     #:children
179     (list
180      (music-doc-node)
181      (translation-doc-node)
182      (backend-doc-node)
183      (all-scheme-functions-doc)
184      (make <texi-node>
185        #:name "Index"
186        #:text "
187 @unnumbered Concept index
188
189 @printindex cp
190
191 @unnumbered Variable index
192
193 @printindex vr
194
195 @unnumbered Function index
196
197 @printindex fn
198
199 \n@bye"
200
201        
202      )
203     )))
204
205
206 (dump-node top-node out-port 0)
207 (newline (current-error-port))
208
209
210
211