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