Fix `split-at-predicate' in `scm/lily-library.scm'.
[lilypond/mpolesky.git] / scm / documentation-generate.scm
blob09c3f35d495ce595e70d2c1f46c47ad023f93aa6
1 ;;;; documentation-generate.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>
8 ;;; File entry point for generated documentation
9 ;;; Running LilyPond on this file generates the documentation
11 ;;(set-debug-cell-accesses! 5000)
13 ;;;;;;;;;;;;;;;;
14 ;;;;;;;;;;;;;;;; TODO : make modules of these!
15 ;;;;;;;;;;;;;;;;
17 ;; todo: naming: grob vs. layout property
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"))
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 (display
31  (slot-ref (all-scheme-functions-doc) 'text)
32  (open-output-file "scheme-functions.tely"))
34 ;;(display 
35 ;; (markup-doc-string)
36 ;; (open-output-file "markup-commands.tely"))
38 (call-with-output-file "markup-commands.tely"
39   (lambda (port)
40     (dump-node (markup-doc-node) port 2)))
42 (call-with-output-file "markup-list-commands.tely"
43   (lambda (port)
44     (dump-node (markup-list-doc-node) port 2)))
46 (display 
47  (identifiers-doc-string)
48  (open-output-file "identifiers.tely"))
51 (display
52  (backend-properties-doc-string all-user-grob-properties)
53  (open-output-file "layout-properties.tely"))
55 (display
56  (translation-properties-doc-string all-user-translation-properties)
57  (open-output-file "context-properties.tely"))
59 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
61 (define file-name "internals")
62 (define outname (string-append file-name ".texi"))
64 (define out-port (open-output-file outname))
66 (writing-wip outname)
68 (display
69  (string-append
70   (texi-file-head "LilyPond Internals Reference" file-name
71                   "(lilypond-internals.info)")
72   "
74 @include macros.itexi
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
85 @iftex
86 @afourpaper
87 @end iftex
89 @finalout
91 @titlepage
92 @title LilyPond
93 @subtitle The music typesetter
94 @titlefont{Internals Reference}
95 @author The LilyPond development team
97 Copyright @copyright{} 1999--2009 by the authors
99 @vskip 20pt
101 For LilyPond version @version{}
102 @end titlepage
104 @contents
106 @ifnottex")
107  out-port)
109 (define top-node
110   (make <texi-node>
111     #:name "GNU LilyPond -- Internals Reference"
112     #:text
113     (string-append  "@end ifnottex
115 @ifhtml
116 @ifclear bigpage
117 This document is also available as a
118 @uref{source/Documentation/internals.pdf,PDF} and as
119 @uref{source/Documentation/internals-big-page.html,one big page}.
120 @end ifclear
121 @ifset bigpage
122 This document is also available as a
123 @uref{source/Documentation/internals.pdf,PDF} and as a
124 @uref{source/Documentation/internals/index.html,HTML indexed multiple pages}.
125 @end ifset
126 @end ifhtml
128 This is the Internals Reference (IR) for version "
129                     (lilypond-version)
130                     " of LilyPond, the GNU music typesetter.")
132     #:children
133     (list
134      (music-doc-node)
135      (translation-doc-node)
136      (backend-doc-node)
137      (all-scheme-functions-doc)
138      (make <texi-node>
139        #:appendix #t
140        #:name "Indices"
141        #:text "
142 @appendixsec Concept index
144 @printindex cp
146 @appendixsec Function index
148 @printindex fn
150 \n@bye"))))
152 (dump-node top-node out-port 0)
153 (newline (current-error-port))