release commit
[lilypond.git] / scm / documentation-generate.scm
blobd04f5c7e8dfc9cf03466d218db049c3bb68e7081
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>
8 ;;; File entry point for generated documentation
10 ;;; Running LilyPond on this file generates the documentation
12 (debug-enable 'debug)
13 (debug-enable 'backtrace)
14 (read-enable 'positions)
16 ;;;;;;;;;;;;;;;;
17 ;;;;;;;;;;;;;;;; TODO : make modules of these!
18 ;;;;;;;;;;;;;;;;
20 ; todo: naming: grob vs. layout property
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)
32 ;;(define no-copies #t)  ; from 490 to 410K, but doesn't look nice yet
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)
50 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52 (dump-node (all-scheme-functions-doc)
53            (open-output-file "scheme-functions.tely")
54            2)
56 (display 
57  (markup-doc-string)
59  (open-output-file "markup-commands.tely")
60  )
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))
68  (open-output-file "layout-properties.tely")
69  2)
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))
77  (open-output-file "context-properties.tely")
78  2)
80 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83 (define file-name "lilypond-internals")
84 (define outname (string-append file-name ".texi"))
87 (define out-port (open-output-file outname))
89 (writing-wip outname)
95 (display
96  (string-append
97   "@c -*-texinfo-*-"
98   (texi-file-head "LilyPond program-reference" outname "(lilypond-internals.info)")
99   "
101 @ifhtml
102 @macro usermanref{NAME}
103 @uref{../lilypond/\\NAME\\.html,\\NAME\\}
104 @cindex \\NAME\\
105 @end macro
106 @end ifhtml
108 @ifinfo
109 @macro usermanref{NAME}
110 @inforef{\\NAME\\,,lilypond}
111 @cindex \\NAME\\
112 @end macro
113 @end ifinfo
115 @ifhtml
116 @macro glossaryref{NAME}
117 @uref{../music-glossary/\\NAME\\.html,\\NAME\\}
118 @cindex \\NAME\\
119 @end macro
120 @end ifhtml
122 @ifinfo
123 @macro glossaryref{NAME}
124 @inforef{\\NAME\\,,music-glossary}
125 @cindex \\NAME\\
126 @end macro
127 @end ifinfo
130 @macro internalsref{NAME}
131 @ref{\\NAME\\}
132 @end macro
134 @ifhtml
136 @macro inputfileref{DIR,NAME}
137 @uref{../../../../\\DIR\\/out-www/collated-files.html#\\NAME\\,@file{\\DIR\\/\\NAME\\}}@c
138 @end macro
140 @end ifhtml
142 @ifinfo
144 @macro inputfileref{DIR,NAME}
145 @file{\\DIR\\/\\NAME\\}
146 @end macro
148 @end ifinfo
150 @iftex
151 @macro inputfileref{DIR,NAME}@c
152 @file{\\DIR\\/\\NAME\\}@c
153 @end macro
154 @end iftex
158 @ignore
159 @omftitle LilyPond internals
160 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
161 @omfdescription Programmer's reference of the LilyPond music engraving system
162 @omftype user's guide
163 @omflanguage English
164 @omfcategory Applications|Publishing
165 @end ignore
168 ") out-port)
170 (define top-node
171   (make <texi-node>
172     #:name "Top"
173     #:children
174     (list
175      (music-doc-node)
176      (translation-doc-node)
177      (backend-doc-node)
178      (all-scheme-functions-doc)
179      (make <texi-node>
180        #:name "Index"
181        #:text "
182 @unnumbered Concept index
184 @printindex cp
186 @unnumbered Variable index
188 @printindex vr
190 @unnumbered Function index
192 @printindex fn
194 \n@bye"
196        
197      )
198     )))
201 (dump-node top-node out-port 0)
202 (newline (current-error-port))