]> git.donarmstrong.com Git - lilypond.git/blob - scm/documentation-generate.scm
478eb20efc13baa8620a3e59149c1b9efc9207bd
[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--2009 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                "lily-sort.scm"
21                "document-functions.scm"
22                "document-translation.scm"
23                "document-music.scm"
24                "document-identifiers.scm"
25                "document-backend.scm"
26                "document-markup.scm"))
27
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29
30 (display
31  (slot-ref (all-scheme-functions-doc) 'text)
32  (open-output-file "scheme-functions.tely"))
33
34 ;;(display 
35 ;; (markup-doc-string)
36 ;; (open-output-file "markup-commands.tely"))
37
38 (call-with-output-file "markup-commands.tely"
39   (lambda (port)
40     (dump-node (markup-doc-node) port 2)))
41
42 (call-with-output-file "markup-list-commands.tely"
43   (lambda (port)
44     (dump-node (markup-list-doc-node) port 2)))
45
46 (display 
47  (identifiers-doc-string)
48  (open-output-file "identifiers.tely"))
49
50
51 (display
52  (backend-properties-doc-string all-user-grob-properties)
53  (open-output-file "layout-properties.tely"))
54
55 (display
56  (translation-properties-doc-string all-user-translation-properties)
57  (open-output-file "context-properties.tely"))
58
59 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
60
61 (define file-name "lilypond-internals")
62 (define outname (string-append file-name ".texi"))
63
64 (define out-port (open-output-file outname))
65
66 (writing-wip outname)
67
68 (display
69  (string-append
70   (texi-file-head "LilyPond program-reference" file-name
71                   "(lilypond/lilypond-internals.info)")
72   "
73
74 @include macros.itexi
75
76 @ignore
77 @omftitle LilyPond internals
78 @omfcreator Han-Wen Nienhuys and Jan Nieuwenhuizen
79 @omfdescription Programmer's reference of the LilyPond music engraving system
80 @omftype user's guide
81 @omflanguage English
82 @omfcategory Applications|Publishing
83 @end ignore
84
85 @iftex
86 @afourpaper
87 @c don't replace quotes with directed quotes
88 @tex
89 \\gdef\\SETtxicodequoteundirected{Foo}
90 \\gdef\\SETtxicodequotebacktick{Bla}
91 @end tex
92 @end iftex
93
94 @finalout
95
96 @titlepage
97 @title LilyPond
98 @subtitle The music typesetter
99 @titlefont{Internals Reference}
100 @author The LilyPond development team
101
102 Copyright @copyright{} 1999--2009 by the authors
103
104 @vskip 20pt
105
106 For LilyPond version @version{}
107 @end titlepage
108
109 @contents
110
111 @ifnottex")
112  out-port)
113
114 (define top-node
115   (make <texi-node>
116     #:name "GNU LilyPond -- Internals Reference"
117     #:text
118     (string-append  "@end ifnottex
119
120 @ifhtml
121 @ifclear bigpage
122 This document is also available as a
123 @uref{source/Documentation/user/lilypond-internals.pdf,PDF} and as
124 @uref{source/Documentation/user/lilypond-internals-big-page.html,one big page}.
125 @end ifclear
126 @ifset bigpage
127 This document is also available as a
128 @uref{source/Documentation/user/lilypond-internals.pdf,PDF} and as a
129 @uref{source/Documentation/user/lilypond-internals/index.html,HTML indexed multiple pages}.
130 @end ifset
131 @end ifhtml
132
133 This is the Internals Reference (IR) for version "
134                     (lilypond-version)
135                     " of LilyPond, the GNU music typesetter.")
136
137     #:children
138     (list
139      (music-doc-node)
140      (translation-doc-node)
141      (backend-doc-node)
142      (all-scheme-functions-doc)
143      (make <texi-node>
144        #:appendix #t
145        #:name "Indices"
146        #:text "
147 @appendixsec Concept index
148
149 @printindex cp
150
151 @appendixsec Function index
152
153 @printindex fn
154
155 \n@bye"))))
156
157 (dump-node top-node out-port 0)
158 (newline (current-error-port))