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