From fdb66b65c89bf9e98da8975999815228d5f0449e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 4 Nov 2000 15:09:38 +0100 Subject: [PATCH] patch::: 1.3.103.jcn3 1.3.103.jcn3 ============ * Generate texinfo iso html documentation. * Added x-references for elements->engravers and engravers->contexts. * Fixed number font listing in style sheet. --- Generated by janneke@gnu.org, From = lilypond-1.3.103.jcn2, To = lilypond-1.3.103.jcn3 usage cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.103.jcn3.diff Patches do not contain automatically generated files or (urg) empty directories, i.e., you should rerun autoconf, configure --- CHANGES | 16 ++- Documentation/index.texi | 4 +- Documentation/user/GNUmakefile | 6 +- Documentation/user/lilypond.tely | 2 + Documentation/user/refman.itely | 3 +- VERSION | 2 +- input/test/chord-names.ly | 2 +- input/test/chords.ly | 2 +- ly/generate-documentation.ly | 3 + scm/backend-documentation-lib.scm | 88 ++++++++++++ scm/basic-properties.scm | 148 -------------------- scm/beam.scm | 148 ++++++++++++++++++++ scm/documentation-lib.scm | 115 +++++++++++++++ scm/element-descriptions.scm | 2 +- scm/engraver-documentation-lib.scm | 153 ++++++++++++++++++++ scm/font.scm | 7 +- scm/generate-backend-documentation.scm | 131 ----------------- scm/generate-documentation.scm | 53 +++++-- scm/generate-engraver-documentation.scm | 179 ------------------------ scm/interface.scm | 128 ++++++++++------- scm/lily.scm | 25 ++-- scm/translator-description.scm | 133 +++++++++++------- 22 files changed, 746 insertions(+), 604 deletions(-) create mode 100644 scm/backend-documentation-lib.scm create mode 100644 scm/beam.scm create mode 100644 scm/documentation-lib.scm create mode 100644 scm/engraver-documentation-lib.scm delete mode 100644 scm/generate-backend-documentation.scm delete mode 100644 scm/generate-engraver-documentation.scm diff --git a/CHANGES b/CHANGES index dde61b7c28..ca75e67641 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,18 @@ ---- ../lilypond-1.3.103/CHANGES Thu Nov 2 15:25:16 2000 +--- ../lilypond-1.3.103.jcn2/CHANGES Fri Nov 3 14:39:30 2000 +++ b/CHANGES Sat Nov 4 15:09:38 2000 +@@ -1,3 +1,12 @@ +1.3.103.jcn3 +============ + +* Generate texinfo iso html documentation. + +* Added x-references for elements->engravers and engravers->contexts. + +* Fixed number font listing in style sheet. + + 1.3.103.jcn2 + ============ + --- ../lilypond-1.3.103/CHANGES Thu Nov 2 15:25:16 2000 ++ b/CHANGES Sat Nov 4 10:40:02 2000 @@ -1,3 +1,22 @@ 1.3.103.lec1 diff --git a/Documentation/index.texi b/Documentation/index.texi index fc4c732961..0bc1a04159 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -22,9 +22,7 @@ @itemize @bullet @item @uref{../user/out-www/lilypond.html,LilyPond reference manual} also available in @uref{../user/out-www/lilypond.ps.gz,Postscript} -@item LilyPond @uref{../user/out-www/backend.html,backend reference}, - @uref{../user/out-www/engravers.html, engraver reference} and - @uref{../user/out-www/contexts.html, context reference}, +@item LilyPond @uref{../user/out-www/lilypond-internals.html,internals} @item @uref{../user/out-www/glossary.html,A glossary of musical terms}, includes translations. Also available in @uref{../user/out-www/glossary.ps.gz,Postscript}) @item @uref{../user/out-www/mudela-book.html,mudela-book}, a tool for diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 98e71f00e6..4bdccbfed6 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -46,5 +46,7 @@ localclean: rm -f fonts.aux fonts.log feta*.tfm feta*.*pk #ugh. out/ hardcoded. -backdoc: - (cd $(outdir); $(topdir)/lily/out/lilypond $(depth)/../ly/generate-documentation) +backdoc: $(outdir)/lilypond-internals.html + +$(outdir)/lilypond-internals.texi: + (cd $(outdir); $(topdir)/lily/out/lilypond ../$(srcdir)/../ly/generate-documentation) diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index b4bbf8a654..9e91317106 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -115,6 +115,8 @@ than the names being similar :-)" @include convert-mudela.itexi +@c @include out/lilypond-internals.texi + @node Index, , , Top @unnumbered Index diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index af651ea05a..4c2f097e0c 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -34,7 +34,8 @@ * paper:: paper * Paper variables:: papervars * contextdefs:: contextdefs -* engravers:: engravers +@c should include backend doco +@c * engravers:: engravers * Sound output:: Sound output * midilist:: midilist * Pre-defined Identifiers:: Pre-defined Identifiers diff --git a/VERSION b/VERSION index 68447c45ba..3c24a11990 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=103 -MY_PATCH_LEVEL=lec1 +MY_PATCH_LEVEL=jcn3 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/input/test/chord-names.ly b/input/test/chord-names.ly index 940999a4b4..cccabf2568 100644 --- a/input/test/chord-names.ly +++ b/input/test/chord-names.ly @@ -23,7 +23,7 @@ chord = \notes\transpose c''\chords{ linewidth = -1.0; \translator { \ChordNamesContext - ChordNames \push #'word-space = #1 + ChordName \push #'word-space = #1 } } } diff --git a/input/test/chords.ly b/input/test/chords.ly index 76e1ca7395..fae83c6f55 100644 --- a/input/test/chords.ly +++ b/input/test/chords.ly @@ -62,7 +62,7 @@ keys = \notes{ \paper{ \translator { \ChordNamesContext - ChordNames \push #'word-space = #1 + ChordName \push #'word-space = #1 } } } diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly index 03399af21a..bc928994e8 100644 --- a/ly/generate-documentation.ly +++ b/ly/generate-documentation.ly @@ -1,2 +1,5 @@ +% +% Running LilyPond on this file generates the documentation +% #(eval-string (ly-gulp-file "generate-documentation.scm")) diff --git a/scm/backend-documentation-lib.scm b/scm/backend-documentation-lib.scm new file mode 100644 index 0000000000..a7d785a00d --- /dev/null +++ b/scm/backend-documentation-lib.scm @@ -0,0 +1,88 @@ + +;;; backend-documentation-lib.scm -- Functions for backend documentation +;;; +;;; source file of the GNU LilyPond music typesetter +;;; +;;; (c) 2000 Han-Wen Nienhuys +;;; Jan Nieuwenhuizen + + +;;; This file generates documentation for the backend of lilypond. + + +;; alist of property descriptions +(define (document-element-property prop desc) + (let ((handle (assoc (car prop) desc))) + (cons + (string-append + "@code{" (symbol->string (car prop)) "} " + "(" (type-name (cadr prop)) "):") + (string-append + (caddr prop) + "\ndefault value: @code{" + (if (pair? handle) + (scm->string (cdr handle)) + "not set" ) + "}")))) + +;; Second level, part of element description +(define (document-interface interface element-description) + (let* ((name (car interface)) + (desc (cadr interface)) + (props (caddr interface)) + (docs (map (lambda (x) + (document-element-property x element-description)) + props))) + + (string-append + (section 2 (string-append "Interface: " (symbol->string name))) + desc + (description-list docs)))) + +;; First level element description +(define (document-element iname description) + (display (string-append "\nProcessing " iname " ... ") (current-error-port)) + (let* ((metah (assoc 'meta description)) + + (meta (if (pair? metah) + (cdr metah) + '((properties . ()) (name . "huh?")) + )) + + (name (cdr (assoc 'name meta))) + (ifaces (cdr (assoc 'interface-descriptions meta))) + (ifacedoc (map (lambda (x) (document-interface x description)) + (reverse ifaces)))) + + (string-append + (node (element-name name)) + (section 2 (element-name name)) + "\n" + + (let* ((element (string->symbol name)) + (engravers + (apply append + (map (lambda (x) + (let ((engraver (car x)) + (objs (cadddr x))) + (if (member element objs) + (list engraver) + '()))) + engraver-description-alist)))) + (string-append + name " elements are created by: " + (human-listify (map reffy (map engraver-name engravers))))) + + (apply string-append ifacedoc)))) + + +(define (document-all-elements name) + (let* ((doc (apply string-append + (map (lambda (x) (document-element (car x) (cdr x))) + all-element-descriptions))) + (names (map car all-element-descriptions))) + + (string-append + (texi-node-menu name (map (lambda (x) (cons (element-name x) "")) + names)) + doc))) diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm index 89efe54dae..4239bc7f41 100644 --- a/scm/basic-properties.scm +++ b/scm/basic-properties.scm @@ -14,154 +14,6 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; BEAMS -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define (default-beam-space-function multiplicity) - (if (<= multiplicity 3) 0.816 0.844) - ) - -; -; width in staff space. -; -(define (default-beam-flag-width-function type) - (cond - ((eq? type 1) 1.98) - ((eq? type 1) 1.65) ;; FIXME: check what this should be and why - (else 1.32) - )) - - -; This is a mess : global namespace pollution. We should wait -; till guile has proper toplevel environment support. - - -;; Beams should be prevented to conflict with the stafflines, -;; especially at small slopes -;; ---------------------------------------------------------- -;; ######## -;; ######## -;; ######## -;; --------------########------------------------------------ -;; ######## -;; -;; hang straddle sit inter hang - -;; inter seems to be a modern quirk, we don't use that - - -;; Note: quanting period is take as quants.top () - quants[0], -;; which should be 1 (== 1 interline) -(define (mean a b) (* 0.5 (+ a b))) -(define (default-beam-dy-quants beam stafflinethick) - (let ((thick (ly-get-elt-property beam 'thickness)) - ) - - (list 0 (mean thick stafflinethick) (+ thick stafflinethick) 1) - )) - -;; two popular veritcal beam quantings -;; see params.ly: #'beam-vertical-quants - -; (todo: merge these 2 funcs ? ) - -(define (default-beam-y-quants beam multiplicity dy staff-line) - (let* ((beam-straddle 0) - (thick (ly-get-elt-property beam 'thickness)) - (beam-sit (/ (+ thick staff-line) 2)) - (beam-hang (- 1 (/ (- thick staff-line) 2))) - (quants (list beam-hang)) - ) - - (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2))) - (set! quants (cons beam-sit quants))) - (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2))) - (set! quants (cons beam-straddle quants))) - ;; period: 1 (interline) - (append quants (list (+ 1 (car quants)))))) - -(define (beam-traditional-y-quants beam multiplicity dy staff-line) - (let* ((beam-straddle 0) - (thick (ly-get-elt-property beam 'thickness)) - (beam-sit (/ (+ thick staff-line) 2)) - (beam-hang (- 1 (/ (- thick staff-line) 2))) - (quants '()) - ) - (if (>= dy (/ staff-line -2)) - (set! quants (cons beam-hang quants))) - (if (and (<= multiplicity 1) (<= dy (/ staff-line 2))) - (set! quants (cons beam-sit quants))) - (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2))) - (set! quants (cons beam-straddle quants))) - ;; period: 1 (interline) - (append quants (list (+ 1 (car quants)))))) - - -;; There are several ways to calculate the direction of a beam -;; -;; * majority: number count of up or down notes -;; * mean : mean centre distance of all notes -;; * median : mean centre distance weighted per note - -(define (dir-compare up down) - (sign (- up down))) - -;; arguments are in the form (up . down) -(define (beam-dir-majority count total) - (dir-compare (car count) (cdr count))) - -(define (beam-dir-mean count total) - (dir-compare (car total) (cdr total))) - -(define (beam-dir-median count total) - (if (and (> (car count) 0) - (> (cdr count) 0)) - (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count))) - (dir-compare (car count) (cdr count)))) - - - -;; [Ross] states that the majority of the notes dictates the -;; direction (and not the mean of "center distance") -;; -;; But is that because it really looks better, or because he wants -;; to provide some real simple hands-on rules? -;; -;; We have our doubts, so we simply provide all sensible alternatives. - -;; array index multiplicity, last if index>size -;; beamed stems - - -;; TODO -;; - take #forced stems into account (now done in C++)? -;; - take y-position of chord or beam into account - -; -; todo: clean this up a bit: the list is getting rather long. -; -(define basic-beam-properties - `( - (molecule-callback . ,Beam::brew_molecule) - (thickness . 0.42) ; in staff-space, should use stafflinethick? - (before-line-breaking-callback . ,Beam::before_line_breaking) - (after-line-breaking-callback . ,Beam::after_line_breaking) - (default-neutral-direction . 1) - (dir-function . ,beam-dir-majority) - (height-quants . ,default-beam-dy-quants) - (vertical-position-quant-function . ,default-beam-y-quants) - (beamed-stem-shorten . (0.5)) - (outer-stem-length-limit . 0.2) - (slope-limit . 0.2) - (flag-width-function . ,default-beam-flag-width-function) - (space-function . ,default-beam-space-function) - (damping . 1) - (meta . ,(element-description "Beam" beam-interface)) - ) - ) - - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Bar lines. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scm/beam.scm b/scm/beam.scm new file mode 100644 index 0000000000..ac9c1ffc80 --- /dev/null +++ b/scm/beam.scm @@ -0,0 +1,148 @@ + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; BEAMS +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (default-beam-space-function multiplicity) + (if (<= multiplicity 3) 0.816 0.844) + ) + +; +; width in staff space. +; +(define (default-beam-flag-width-function type) + (cond + ((eq? type 1) 1.98) + ((eq? type 1) 1.65) ;; FIXME: check what this should be and why + (else 1.32) + )) + + +; This is a mess : global namespace pollution. We should wait +; till guile has proper toplevel environment support. + + +;; Beams should be prevented to conflict with the stafflines, +;; especially at small slopes +;; ---------------------------------------------------------- +;; ######## +;; ######## +;; ######## +;; --------------########------------------------------------ +;; ######## +;; +;; hang straddle sit inter hang + +;; inter seems to be a modern quirk, we don't use that + + +;; Note: quanting period is take as quants.top () - quants[0], +;; which should be 1 (== 1 interline) +(define (mean a b) (* 0.5 (+ a b))) +(define (default-beam-dy-quants beam stafflinethick) + (let ((thick (ly-get-elt-property beam 'thickness)) + ) + + (list 0 (mean thick stafflinethick) (+ thick stafflinethick) 1) + )) + +;; two popular veritcal beam quantings +;; see params.ly: #'beam-vertical-quants + +; (todo: merge these 2 funcs ? ) + +(define (default-beam-y-quants beam multiplicity dy staff-line) + (let* ((beam-straddle 0) + (thick (ly-get-elt-property beam 'thickness)) + (beam-sit (/ (+ thick staff-line) 2)) + (beam-hang (- 1 (/ (- thick staff-line) 2))) + (quants (list beam-hang)) + ) + + (if (or (<= multiplicity 1) (>= (abs dy) (/ staff-line 2))) + (set! quants (cons beam-sit quants))) + (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2))) + (set! quants (cons beam-straddle quants))) + ;; period: 1 (interline) + (append quants (list (+ 1 (car quants)))))) + +(define (beam-traditional-y-quants beam multiplicity dy staff-line) + (let* ((beam-straddle 0) + (thick (ly-get-elt-property beam 'thickness)) + (beam-sit (/ (+ thick staff-line) 2)) + (beam-hang (- 1 (/ (- thick staff-line) 2))) + (quants '()) + ) + (if (>= dy (/ staff-line -2)) + (set! quants (cons beam-hang quants))) + (if (and (<= multiplicity 1) (<= dy (/ staff-line 2))) + (set! quants (cons beam-sit quants))) + (if (or (<= multiplicity 2) (>= (abs dy) (/ staff-line 2))) + (set! quants (cons beam-straddle quants))) + ;; period: 1 (interline) + (append quants (list (+ 1 (car quants)))))) + + +;; There are several ways to calculate the direction of a beam +;; +;; * majority: number count of up or down notes +;; * mean : mean centre distance of all notes +;; * median : mean centre distance weighted per note + +(define (dir-compare up down) + (sign (- up down))) + +;; arguments are in the form (up . down) +(define (beam-dir-majority count total) + (dir-compare (car count) (cdr count))) + +(define (beam-dir-mean count total) + (dir-compare (car total) (cdr total))) + +(define (beam-dir-median count total) + (if (and (> (car count) 0) + (> (cdr count) 0)) + (dir-compare (/ (car total) (car count)) (/ (cdr total) (cdr count))) + (dir-compare (car count) (cdr count)))) + + + +;; [Ross] states that the majority of the notes dictates the +;; direction (and not the mean of "center distance") +;; +;; But is that because it really looks better, or because he wants +;; to provide some real simple hands-on rules? +;; +;; We have our doubts, so we simply provide all sensible alternatives. + +;; array index multiplicity, last if index>size +;; beamed stems + + +;; TODO +;; - take #forced stems into account (now done in C++)? +;; - take y-position of chord or beam into account + +; +; todo: clean this up a bit: the list is getting rather long. +; +(define basic-beam-properties + `( + (molecule-callback . ,Beam::brew_molecule) + (thickness . 0.42) ; in staff-space, should use stafflinethick? + (before-line-breaking-callback . ,Beam::before_line_breaking) + (after-line-breaking-callback . ,Beam::after_line_breaking) + (default-neutral-direction . 1) + (dir-function . ,beam-dir-majority) + (height-quants . ,default-beam-dy-quants) + (vertical-position-quant-function . ,default-beam-y-quants) + (beamed-stem-shorten . (0.5)) + (outer-stem-length-limit . 0.2) + (slope-limit . 0.2) + (flag-width-function . ,default-beam-flag-width-function) + (space-function . ,default-beam-space-function) + (damping . 1) + (meta . ,(element-description "Beam" beam-interface)) + ) + ) + diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm new file mode 100644 index 0000000000..2ee6e7a9cf --- /dev/null +++ b/scm/documentation-lib.scm @@ -0,0 +1,115 @@ +;;; +;;; documentation-lib.scm -- Assorted Functions for generated documentation +;;; +;;; source file of the GNU LilyPond music typesetter +;;; +;;; (c) 2000 Han-Wen Nienhuys +;;; Jan Nieuwenhuizen + +(define (uniqued-alist alist acc) + (if (null? alist) acc + (if (assoc (caar alist) acc) + (uniqued-alist (cdr alist) acc) + (uniqued-alist (cdr alist) (cons (car alist) acc) + )))) + +(define (self-evaluating? x) + (or (number? x) (string? x) (procedure? x) (boolean? x))) + +(define (texify x) + x) +;; (let* +;; ((x1 (regexp-substitute/global #f "\([^@]\){" x 'pre "\1@{" 'post)) +;; ((x2 (regexp-substitute/global #f "\([^@]\){" x 'pre "\1@{" 'post)) +;; ((x3 (regexp-substitute/global #f "\([^@]\)@" x 'pre "\1@@" 'post)) +;; ) +;; x2)) + +(define (scm->string val) + (string-append + (if (self-evaluating? val) "" "'") + (texify + (call-with-output-string (lambda (port) (display val port)))) + )) + +(define (node name) + (string-append + "\n@html" + "\n
" + "\n@end html" + "\n@node " name ",,,")) + +(define section-alist + '( + ;; Hmm, texinfo doesn't have ``part'' + (0 . "@top") + (1 . "@unnumbered") + (2 . "@unnumberedsec") + (3 . "@unnumberedsubsec") + (4 . "@unnumberedsubsubsec") + (5 . "@unnumberedsubsubsec") + )) + +(define (section level name) + (string-append "\n" (cdr (assoc level section-alist)) " " name "\n")) + +(define (description-list items-alist) + (string-append + "\n@table @samp\n" + (apply string-append + (map (lambda (x) (string-append "\n@item " (car x) "\n" (cdr x))) + items-alist)) + "\n@end table\n")) + +(define (texi-menu items-alist) + (string-append + "\n@menu" + (apply string-append + (map (lambda (x) (string-append "\n* " (car x) ":: " (cdr x))) + items-alist)) + "\n@end menu\n" + ;; Menus don't appear in html, so we make a list ourselves + "\n@ifhtml\n" + (description-list (map (lambda (x) (cons (reffy (car x)) (cdr x))) + items-alist)) + "\n@end ifhtml\n")) + + +(define (texi-node-menu name items-alist) + (string-append + (node name) + (section 1 name) + (texi-menu items-alist))) + +(define (texi-file-head name file-name items-alist) + (string-append + "\input texinfo @c -*-texinfo-*-\n" + "@settitle " name + "\n@setfilename " file-name ".info" + (node "Top") + "\n@top" + (section 1 name) + (texi-menu items-alist))) + +(define (context-name name) + (string-append "Context " name)) + +(define (engraver-name name) + name) + +(define (element-name name) + (string-append "Element " name)) + +(define (reffy x) + (string-append "@ref{" x "}")) + +(define (human-listify l) + (cond + ((null? l) "none") + ((null? (cdr l)) (car l)) + ((null? (cddr l)) (string-append (car l) " and " (cadr l))) + (else (string-append (car l) ", " (human-listify (cdr l)))) + )) + +(define (writing-wip x) + (display (string-append "\nWriting " x " ... ") (current-error-port))) diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 1e1c570fa6..094195f846 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -91,7 +91,7 @@ (after-line-breaking-callback . ,Chord_name::after_line_breaking) (chord-name-function . ,default-chord-name-function) (font-family . roman) - (meta . ,(element-description "ChordNames" font-interface text-interface chord-name-interface)) + (meta . ,(element-description "ChordName" font-interface text-interface chord-name-interface)) )) (Custos . ( diff --git a/scm/engraver-documentation-lib.scm b/scm/engraver-documentation-lib.scm new file mode 100644 index 0000000000..bdf12cad61 --- /dev/null +++ b/scm/engraver-documentation-lib.scm @@ -0,0 +1,153 @@ + +;;; engraver-documentation-lib.scm -- Functions for engraver documentation +;;; +;;; source file of the GNU LilyPond music typesetter +;;; +;;; (c) 2000 Han-Wen Nienhuys +;;; Jan Nieuwenhuizen + + +(eval-string (ly-gulp-file "translator-description.scm")) + +;; alist of translater descriptions +(define (document-translator-property prop-desc) + (cons + (string-append + "@code{" (car prop-desc) "} " + "(" (type-name (cadr prop-desc)) "):") + (caddr prop-desc))) + +;; First level Engraver description and +;; second level Context description +(define (document-engraver level engraver-descr) + + (let* ( + (props (car (cdddr engraver-descr))) + (name (car engraver-descr)) + (desc (cadr engraver-descr)) + (objs (caddr engraver-descr)) + ) + + (string-append + (section level (engraver-name name)) + desc + "\n\n" + (if (null? props) + "" + (string-append + (section (+ level 1) "Properties") + (description-list + (map (lambda (x) (document-translator-property x)) props)))) + (if (null? objs) + "" + (string-append + "This engraver creates \n " + (human-listify (map reffy (map element-name objs))) + " elements.") + ) + + "\n\n" + + (let* ((paper-alist (My_lily_parser::paper_description)) + (context-description-alist (map cdr paper-alist)) + (contexts + (apply append + (map (lambda (x) + (let ((context (cdr (assoc 'type-name x))) + (consists (append + (list (cdr (assoc 'group-type x))) + (cdr (assoc 'consists x)) + (cdr (assoc 'end-consists x))))) + + (if (member name consists) + (list context) + '()))) + context-description-alist)))) + (string-append + name " is part of contexts: " + (human-listify (map reffy (map context-name contexts)))))))) + + +;; First level Engraver description +(define (document-separate-engraver top description) + (let ((name (car description))) + (string-append + (node (engraver-name name)) + (document-engraver 2 description)))) + +;; Second level, part of Context description +(define (document-engraver-by-name name) + (let* + ( + (eg (assoc (string->symbol name) engraver-description-alist)) + ) + + (if (eq? eg #f) + (string-append "Engraver " name ", not documented.\n") + (document-engraver 3 (cdr eg)) + ) + )) + +(define (context-doc-string context-desc) + (let* + ( + (name (cdr (assoc 'type-name context-desc))) + (desc-handle (assoc (string->symbol name) context-description-alist)) + (desc (if (pair? desc-handle) (cdr desc-handle) "")) + + (accepts (cdr (assoc 'accepts context-desc))) + (consists (append + (list (cdr (assoc 'group-type context-desc))) + (cdr (assoc 'consists context-desc)) + (cdr (assoc 'end-consists context-desc)) + )) + ) + + (string-append + desc + + (if (null? accepts) + "This context is a `bottom' context; it can not contain other contexts." + (string-append + name " can contain \n" + (human-listify (map reffy (map context-name accepts))))) + + "\n\nThis context is built from the following engravers\n" + (apply string-append + (map document-engraver-by-name consists))))) + + +;; First level Context description +(define (document-context top context-desc) + (let ((name (cdr (assoc 'type-name context-desc))) + (doc (context-doc-string context-desc))) + + (string-append + (node (context-name name)) + (section 2 (context-name name)) + doc))) + +(define (document-paper name) + (let* ((paper-alist (My_lily_parser::paper_description)) + (names (sort (map car paper-alist) string" x 'pre ">" 'post)) - (x2 (regexp-substitute/global #f "<" x1 'pre "<" 'post)) - ) - x2)) - -(define (scm->string val) - (string-append - (if (self-evaluating? val) "" "'") - (htmlfy - (call-with-output-string (lambda (port) (display val port)))) - )) - -(define (document-property prop desc) - (let ((handle (assoc (car prop) desc))) - (string-append - "\n
  • " (symbol->string (car prop)) " (" (type-name (cadr prop)) ") -- " - (caddr prop) - "
    default value: " - (if (pair? handle) - (scm->string (cdr handle)) - "not set" - ) - "\n" - ) - )) - -(define (document-interface interface elt-description) - (let* ((name (car interface)) - (desc (cadr interface)) - (props (caddr interface)) - (docs (map (lambda (x) (document-property x elt-description)) - props)) - ) - - (string-append - "
    " - "

    Interface: " (symbol->string name) "

    \n" - desc - "
    \n
      " - (apply string-append docs) - "
    " - ) - )) - -; -; generate HTML, return filename. -; -(define (document-element iname description) - (display (string-append "Processing " iname " ... ") (current-error-port)) - (let* ((metah (assoc 'meta description)) - - (meta (if (pair? metah) - (cdr metah) - '((properties . ()) (name . "huh?")) - )) - - (name (cdr (assoc 'name meta))) - (ifaces (cdr (assoc 'interface-descriptions meta))) - (ifacedoc (map (lambda (x) (document-interface x description)) - (reverse ifaces))) - (outname (string-append name ".html")) - (out (open-output-file outname)) - ) - (writing-wip outname) - (display - (string-append "LilyPond Element " name " " - "

    " name "

    " - (apply string-append ifacedoc)) - out) - outname - ) - ) - -(define (document-elements elts) - (let* ((files (map (lambda (x) (document-element (car x) (cdr x))) - elts)) - (names (map car elts)) - (outname (string-append "backend.html")) - (out (open-output-file outname)) - (l (map (lambda (x) (string-append "
  • " - (urlfy x))) names)) - ) - (writing-wip outname) - (display - (string-append - "LilyPond backend documentation" - "

    LilyPond backend documentation

    " - "
      " - (apply string-append l) - "
    " - ) - out - ) - )) - -; (display (document-interface stem-interface '())) -; (define b (cdr (assoc 'Dyna all-element-descriptions))) -;(display b) - -;(document-element b) - -(document-elements all-element-descriptions) - diff --git a/scm/generate-documentation.scm b/scm/generate-documentation.scm index 14db4f9ce8..fa6d30246c 100644 --- a/scm/generate-documentation.scm +++ b/scm/generate-documentation.scm @@ -1,20 +1,45 @@ +;;; generate-documentation.scm -- Generate documentation +;;; +;;; source file of the GNU LilyPond music typesetter +;;; +;;; (c) 2000 Han-Wen Nienhuys +;;; Jan Nieuwenhuizen -(define (urlfy x) - (string-append "" x "")) +;;; File entry point for generated documentation -(define (human-listify l) - (cond - ((null? l) "none") - ((null? (cdr l)) (car l)) - ((null? (cddr l)) (string-append (car l) " and " (cadr l))) - (else (string-append (car l) ", " (human-listify (cdr l)))) - )) +;;; Running LilyPond on this file generates the documentation -(define (writing-wip x) - (display (string-append "Writing " x " ... \n") (current-error-port)) - ) -(eval-string (ly-gulp-file "generate-engraver-documentation.scm")) -(eval-string (ly-gulp-file "generate-backend-documentation.scm")) +;; We use ly-gulp because these files live in +;; +;; PATH=$LILYPONDPREFIX/scm:/scm +;; +(eval-string (ly-gulp-file "documentation-lib.scm")) +(eval-string (ly-gulp-file "engraver-documentation-lib.scm")) +(eval-string (ly-gulp-file "backend-documentation-lib.scm")) + +(let* ((doc (string-append + (document-paper "LilyPond interpretation contexts") + (document-all-engravers "LilyPond engravers") + (document-all-elements "LilyPond backend"))) + (name "lilypond-internals") + (outname (string-append name ".texi")) + (out (open-output-file outname))) + + (writing-wip outname) + (display + (string-append + (texi-file-head + + ;; we can't use (dir) and top if we're included by lilypond.tely + "LilyPond internals" name + '(("LilyPond interpretation contexts" . "Hierarchy and grouping of Engravers") + ("LilyPond engravers" . "Engravers create Elements") + ("LilyPond backend" . "Detailed description of all Elements"))) + + doc) + out)) + +(newline (current-error-port)) diff --git a/scm/generate-engraver-documentation.scm b/scm/generate-engraver-documentation.scm deleted file mode 100644 index 9ab114fb6d..0000000000 --- a/scm/generate-engraver-documentation.scm +++ /dev/null @@ -1,179 +0,0 @@ -(eval-string (ly-gulp-file "translator-description.scm")) - -(define (document-trans-property prop-desc) - (string-append "
  • " (car prop-desc) "" - " (" (type-name (cadr prop-desc)) "):" - (caddr prop-desc) - ) - ) - -(define (document-engraver engraver-descr) - - (let* ( - (props (car (cdddr engraver-descr))) - (name (car engraver-descr)) - (desc (cadr engraver-descr)) - (objs (caddr engraver-descr)) - ) - (string-append - "

    " name "

    \n" - desc - "

    " - (if (null? props) - "" - (string-append - "

    Properties

    \n
      \n" - (apply string-append - (map (lambda (x) (document-trans-property x)) props) - ) - "
    \n") - ) - (if (null? objs) - "" - (string-append - "This engraver creates \n " - (human-listify (map urlfy objs)) - " objects") - ) - ) - ) - ) - - -(define (document-engraver-by-name name) - (let* - ( - (eg (assoc (string->symbol name) engraver-description-alist)) - ) - - (if (eq? eg #f) - (string-append "Engraver " name ", not documented.\n") - (document-engraver (cdr eg)) - ) -)) - -(define (context-doc-string context-desc) - (let* - ( - (name (cdr (assoc 'type-name context-desc))) - (desc-handle (assoc (string->symbol name) context-description-alist)) - (desc (if (pair? desc-handle) (cdr desc-handle) "")) - - (accepts (cdr (assoc 'accepts context-desc))) - (consists (append - (list (cdr (assoc 'group-type context-desc))) - (cdr (assoc 'consists context-desc)) - (cdr (assoc 'end-consists context-desc)) - )) - ) - - (string-append - "

    Context " name "

    \n" - desc - - (if (null? accepts) - "This context is a `bottom' context; it can not contain other contexts." - (string-append - name " can contain \n" - (human-listify (map urlfy accepts)) - )) - "

    This context is built from the following engravers\n" - (apply string-append - (map document-engraver-by-name consists) - ) - ) - ) - ) - - -;; FIXME element ChordNames overwrites context ChordNames. -(define (document-context context-desc) - (let* - ( - (name (cdr (assoc 'type-name context-desc))) - (docstr (context-doc-string context-desc)) - (outname (string-append name ".html")) - (out (open-output-file outname)) - ) - - (writing-wip outname) - (display - (string-append "LilyPond Context " name " " - docstr) - out - ) - outname) - ) - - - -(define (document-paper paper-alist) -; (write paper-alist) - (let* - ( - (names (sort (map car paper-alist) string" (urlfy x))) - names)) - ) - - (display - (string-append - "LilyPond interpretation context documentation" - "

    LilyPond interpretation context documentation

    " - "
      " - (apply string-append l) - "
    " - ) - out - ) - ) - ) - -(define (document-engraver-separately desc) - (let* ( - (name (car desc)) - (outname (string-append name ".html")) - (out (open-output-file outname)) - (doc (document-engraver desc)) - ) - - (writing-wip outname) - (display doc out) - outname - )) - -(define (document-all-engravers) - (let* - ( - (descs (map cdr engraver-description-alist)) - (names (map car engraver-description-alist)) - (fnames (map document-engraver-separately descs)) - (outname "engravers.html") - (out (open-output-file outname)) - ) - - (display - (string-append - "All LilyPond engravers" - "

    All LilyPond engravers

    " - "
      " - (apply string-append - (map (lambda (x) (string-append "
    • " x)) - (map urlfy names))) - "
    " - ) out) - )) - -; (display (document-engraver 'Stem_engraver)) - - - -;(display (human-listify '("a" "b" "c"))) - -(document-paper (My_lily_parser::paper_description)) -(document-all-engravers) diff --git a/scm/interface.scm b/scm/interface.scm index 870e365bbd..3c201da7eb 100644 --- a/scm/interface.scm +++ b/scm/interface.scm @@ -1,7 +1,12 @@ ; should include default value? -;;; ::::::: should generate documentation for score elements from here. + +;;; FIXME: naming. +;;; Score elements are called `objects' now and then, which gets +;;; rather confusing, we now have `elements', `items', `spanners' +;;; and `objects'. + (define (elt-property-description symbol type? description) (list symbol type? description)) @@ -45,18 +50,18 @@ "All elements support this" (list (elt-property-description 'X-offset-callbacks list? "list of functions, each taking an element and axis argument. The function determine the position relative to this element's parent. The last one in the list is called first") - (elt-property-description 'Y-offset-callbacks list? "see X-offset-callbacks") + (elt-property-description 'Y-offset-callbacks list? "see @code{X-offset-callbacks}") (elt-property-description 'X-extent-callback procedure? "procedure taking an element and axis argument, returning a number-pair. The return value is the extent of the element.") - (elt-property-description 'Y-extent-callback procedure? "see X-extent-callback ") + (elt-property-description 'Y-extent-callback procedure? "see @code{X-extent-callback}") (elt-property-description 'font-relative-size integer? "") (elt-property-description 'extra-offset number-pair? "pair of reals (a cons) forcing an extra offset before outputting") - (elt-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the meta field.") + (elt-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.") (elt-property-description 'dependencies list? "list of score-element pointers that indicate who to compute first for certain global passes") (elt-property-description 'no-spacing-rods boolean? "read from elements: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM)") (elt-property-description 'extra-extent-X number-pair? "enlarge in X dimension by this much, measured in staff space") - (elt-property-description 'extra-extent-Y number-pair? "see extra-extent-Y") + (elt-property-description 'extra-extent-Y number-pair? "see @code{extra-extent-Y}") (elt-property-description 'minimum-extent-X number-pair? "minimum size in X dimension, measured in staff space") - (elt-property-description 'minimum-extent-Y number-pair? "see minimum-extent-Y") + (elt-property-description 'minimum-extent-Y number-pair? "see @code{minimum-extent-Y}") (elt-property-description 'origin ly-input-location? "location in input file of the definition") (elt-property-description 'transparent boolean? "This is almost the same as setting molecule-callback to #f, but this retains the @@ -86,21 +91,21 @@ Caching of computed values is permissible, and generally useful, though. direction to choose if we're in the middle of the staff ") (elt-property-description 'thickness number? "weight of beams, in staffspace") (elt-property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace)") - (elt-property-description 'beamed-stem-shorten number? "") - (elt-property-description 'height-quants number? "") - (elt-property-description 'vertical-position-quant-function procedure? "") - (elt-property-description 'dir-function procedure? "") + (elt-property-description 'beamed-stem-shorten number? "shorten beamed stems in forced direction") + (elt-property-description 'height-quants procedure? "function of type (beam staff-line-thickness) -> list of quants. Default value: default-beam-dy-quants. +") + (elt-property-description 'vertical-position-quant-function procedure? " +function of type (beam multiplicity dy staff-line-thickness) -> real. Default value: default-beam-y-quants, also available: beam-traditional-y-quants. +") + (elt-property-description 'dir-function procedure? "function of type (count total)->direction. Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.") (elt-property-description 'damping number? "damping factor.") (elt-property-description 'outer-stem-length-limit number? "catch suspect beam slopes, set slope to zero if outer stem is lengthened more than this (in staffspace)") (elt-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.") ) -)) - - + )) -;;;;;;;;;;;;;;;;;;;; (define clef-interface (lily-interface @@ -129,7 +134,7 @@ more than this (in staffspace)") (elt-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.") (elt-property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.") (elt-property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count in collisions. -

    + Merge noteheads in collisions, even if they have a different number of dots. This normal notation for polyphonic guitar music. @@ -198,10 +203,11 @@ one end of the stem") (elt-property-description 'minimum-space number? "minimum distance that the victim should move (after padding)") (elt-property-description 'padding number? "add this much extra space between victim and support") (elt-property-description 'self-alignment-X number? "real number: -1 = -left aligned, 0 = center, 1 right-aligned in X direction.

    Set to -an element pointer, if you want that element to be the center. In -this case, the center element should have this object as a reference -point. +left aligned, 0 = center, 1 right-aligned in X direction. + + Set to an element pointer, if you want that element to be the center. +In this case, the center element should have this object as a +reference point. ") (elt-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis") @@ -222,12 +228,12 @@ point. (lily-interface 'line-of-score-interface "Super element, parent of all: -

    - The columns of a score that form one line. The toplevel element. - Any element has a Line_of_score as both X and Y reference - point. The Paper_score contains one element of this type. Control - enters the Score_element dependency calculation from this single - Line_of_score object." + +The columns of a score that form one line. The toplevel element. Any +element has a Line_of_score as both X and Y reference point. The +Paper_score contains one element of this type. Control enters the +Score_element dependency calculation from this single Line_of_score +object." (list (elt-property-description 'between-system-string string? "string to dump between two systems. Useful for forcing pagebreaks") @@ -294,7 +300,7 @@ Setting it to false will prevent printing of the bracket. Setting the property to #'if-no-beam will make it print only if there is no beam associated with this tuplet bracket.") (elt-property-description 'tuplet-number-visibility boolean-or-symbol? " -Like tuplet-bracket-visibility, but for the number.") +Like @code{tuplet-bracket-visibility}, but for the number.") (elt-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket ") (elt-property-description 'thick number? "thickness, in stafflinethickness") ) @@ -460,34 +466,47 @@ hufnagel, vaticana and medicaea [TODO: should use symbol] ") (list (elt-property-description 'text (lambda (x) (or (string? x) (list? x))) " Scheme markup text. It is defined as follows: -

    -TEXT : STRING | (MARKUP SENTENCE)
    -MARKUP: PROPERTY | ABBREV
    -SENTENCE: TEXT | SENTENCE TEXT
    -PROPERTY: (key . value)
    +@example + +TEXT : STRING | (MARKUP SENTENCE) +MARKUP: PROPERTY | ABBREV +SENTENCE: TEXT | SENTENCE TEXT +PROPERTY: (key . value) ABBREV: rows lines roman music bold italic named super sub text, or any font-style -

    + +@end example So, TEXT is either a string, or a list of which the CAR is a MARKUP. MARKUP is either a CONS: an element property '(key . value) or a symbol: a predefined abbreviation for a list of element properties. -

    + The following abbreviations are currently defined: -

    -
    rows
    horizontal mode: set all text on one line (default) -
    lines
    vertical mode: set every text on new line -
    roman
    select roman font -
    music
    select feta font -
    bold
    select bold series -
    italic
    select italic shape -
    named
    lookup by character name -
    text
    plain text lookup (by character value) -
    super
    superscript -
    sub
    subscript -
    any font-style
    finger volta timesig mmrest mark script large Large dynamic -
    +@table @samp +@item rows +horizontal mode: set all text on one line (default) +@item lines + vertical mode: set every text on new line +@item roman + select roman font +@item music + select feta font +@item bold + select bold series +@item italic + select italic shape +@item named + lookup by character name +@item text + plain text lookup (by character value) +@item super + superscript +@item sub + subscript +@item any font-style + finger volta timesig mmrest mark script large Large dynamic +@end table " ) ;; Should move this somewhere else? (elt-property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical") @@ -522,7 +541,7 @@ The following abbreviations are currently defined: (define separation-spanner-interface (lily-interface 'separation-spanner-interface - "Spanner that containing separation-item-interface elements to calculate rods" + "Spanner that containing @code{separation-item-interface} elements to calculate rods" '() )) (define text-script-interface @@ -665,7 +684,7 @@ conflicts." (elt-property-description 'minimum-distance number? "minimum distance between notes and rests.") (elt-property-description 'elements list? "list of elements (NoteColumn, generally) participating in the collision. The -rest-collision property in elements is set +@code{rest-collision} property in @code{elements} is set to a pointer to the collision") ))) @@ -680,7 +699,7 @@ to a pointer to the collision") (define script-column-interface (lily-interface 'script-column-interface - "An interface that sorts scripts according to their script-priority" + "An interface that sorts scripts according to their @code{script-priority}" (list ))) @@ -706,17 +725,18 @@ arithmetic_basicspace is set to a value so that the shortest note takes about two noteheads of space (ie, is followed by a notehead of space): +@example 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) )) - { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) } - { assuming: SHORTEST <= 1/8 } + @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @} + @{ assuming: SHORTEST <= 1/8 @} = arithmetic_multiplier * ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) ) = arithmetic_multiplier * arithmetic_basicspace - { choose: arithmetic_multiplier = 1.0*quartwidth (why?)} + @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @} = quartwidth * arithmetic_basicspace @@ -724,10 +744,12 @@ space): arithmetic_basicspace = 2/1 = 2 + If you want to space your music wider, use something like: arithmetic_basicspace = 4.; +@end example ") (elt-property-description 'arithmetic-multiplier number? "see arithmetic-basicspace") @@ -758,7 +780,7 @@ position 0." (lily-interface 'separation-item-interface "Item that computes widths to generate spacing rods. -

    + Calc dimensions for the Separating_group_spanner; this has to be an item to get dependencies correct. It can't be an element_group since these usually are in a different X_group diff --git a/scm/lily.scm b/scm/lily.scm index a50b23c915..be6872c677 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -1,16 +1,18 @@ -; lily.scm -- implement Scheme output routines for TeX and PostScript -; -; source file of the GNU LilyPond music typesetter -; -; (c) 1998 Jan Nieuwenhuizen +;;; lily.scm -- implement Scheme output routines for TeX and PostScript +;;; +;;; source file of the GNU LilyPond music typesetter +;;; +;;; (c) 1998--2000 Jan Nieuwenhuizen +;;; Han-Wen Nienhuys -; -; This file contains various routines in Scheme that are easier to -; do here than in C++. At present it is an unorganised mess. Sorry. -; -; We should repartition the entire scm side of lily in a -; more sane way, using namesspaces/modules? +;;; +;;; This file contains various routines in Scheme that are easier to +;;; do here than in C++. At present it is an unorganised mess. Sorry. + + +;;; We should repartition the entire scm side of lily in a +;;; more sane way, using namesspaces/modules? (debug-enable 'backtrace) @@ -756,6 +758,7 @@ (begin (eval-string (ly-gulp-file "interface.scm")) + (eval-string (ly-gulp-file "beam.scm")) (eval-string (ly-gulp-file "slur.scm")) (eval-string (ly-gulp-file "font.scm")) (eval-string (ly-gulp-file "auto-beam.scm")) diff --git a/scm/translator-description.scm b/scm/translator-description.scm index e05e36346b..6f8beaa2b1 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -63,18 +63,18 @@ is erased. (translator-property-description 'CONTEXTNAMEVerticalExtent number-pair? "hard coded vertical extent. The format is a pair of dimensions, for example, this sets the sizes -of a staff to 10 (5+5) staffspaces high.

    +of a staff to 10 (5+5) staffspaces high. - +@example \property Staff.StaffVerticalExtent = #(-5.0 . 5.0) - +@end example [fixme, naming]") (translator-property-description 'CONTEXTNAMEMinimumVerticalExtent number-pair? "minimum vertical extent, same format as CONTEXTNAMEVerticalExtent [fixme, naming]") (translator-property-description - 'CONTEXTNAExtraVerticalExtent number-pair? + 'CONTEXTNAMExtraVerticalExtent number-pair? "extra vertical extent, same format CONTEXTNAMEMinimumVerticalExtent [fixme, naming]") ))) @@ -103,16 +103,17 @@ interesting items (ie. note heads, lyric syllables and normal rests)" (translator-property-description 'forgetAccidentals boolean? "do not set localKeySignature when a note alterated differently from localKeySignature is found. -

    + Causes accidentals to be printed at every note instead of remembered for the duration of a measure. ") (translator-property-description 'noResetKey boolean? "Do not reset local key to the value of keySignature at the start of a measure, -as determined by measurePosition.

    - Do not reset the key at the start of a measure. Accidentals will - be printed only once and are in effect until overridden, possibly - many measures later. +as determined by measurePosition. + +Do not reset the key at the start of a measure. Accidentals will be +printed only once and are in effect until overridden, possibly many +measures later. ") ))) @@ -128,7 +129,7 @@ as determined by measurePosition.

    (translator-property-description 'repeatCommands list? "This property is read to find any command of the form (volta . X), where X is a string or #f") (translator-property-description 'voltaSpannerDuration moment? - "maximum duration of the volta bracket.

    + "maximum duration of the volta bracket. Set to a duration to control the size of the brackets printed by @code{\alternative}. It specifies the number of whole notes duration @@ -166,19 +167,15 @@ given in an @code{\alternative}. '(TextScript) (list (translator-property-description 'combineParts boolean? "try to combine parts?") + (translator-property-description 'soloADue boolean? "set Solo/A due texts?") + (translator-property-description 'soloText string? "text for begin of solo") + (translator-property-description 'soloIIText string? "text for begin of solo for voice ``two''") + (translator-property-description 'aDueText string? "text for begin of a due") + (translator-property-description 'split-interval number-pair? "always split into two voices for contained intervals") (translator-property-description 'unison boolean? "set if unisono is detected ") - (translator-property-description 'solo boolean? "") - (translator-property-description 'soloADue boolean? "") - (translator-property-description 'soloText string? "") - (translator-property-description 'soloIIText string? "") - (translator-property-description 'aDueText string? "") - (translator-property-description 'combineParts boolean? "") - (translator-property-description 'unisilence boolean? "") - (translator-property-description 'unison boolean? "") - (translator-property-description 'unirhythm boolean? "") - (translator-property-description 'solo boolean? "") - (translator-property-description 'split-interval number-pair? "") - (translator-property-description 'soloADue boolean? "") + (translator-property-description 'solo boolean? "set if solo is detected") + (translator-property-description 'unisilence boolean? "set if unisilence is detected") + (translator-property-description 'unirhythm boolean? "set if unirhythm is detected") ))) (cons @@ -214,14 +211,36 @@ Uses beatLength, measureLength and measurePosition to decide when to start and s (list (translator-property-description 'noAutoBeaming boolean? " If set to true then beams are not generated automatically. ") - (translator-property-description 'beamAutoEnd moment? " - Specifies when automatically generated beams can end. See - section XREF-autobeam [FIXME].") - (translator-property-description 'beamAutoBegin moment? " - Specifies when automatically generated beams can start. See - section XREF-autobeam [FIXME].") + (translator-property-description 'autoBeamSettings list? " +Specifies when automatically generated beams should begin and end. The elements have the format: - ))) +@example + + function shortest-duration-in-beam time-signature + +where + + function = begin or end + shortest-duration-in-beam = numerator denominator; eg: 1 16 + time-signature = numerator denominator, eg: 4 4 + +unspecified or wildcard entries for duration or time-signature +are given by * * + +The user can override beam begin or end time by pushing a wildcard entries +'(begin * * * *) or '(end * * * *) resp., eg: + + \property Voice.autoBeamSettings \push #'(end * * * *) = #(make-moment 1 4) + +The head of the list: + '( + ((end * * 3 2) . ,(make-moment 1 2)) + ((end 1 16 3 2) . ,(make-moment 1 4)) + ((end 1 32 3 2) . ,(make-moment 1 8)) + ... + ) + +@end example")))) (cons 'Bar_engraver @@ -232,9 +251,9 @@ Uses beatLength, measureLength and measurePosition to decide when to start and s (list (translator-property-description 'whichBar string? "This property is read to determine what type of barline to create. Example: -

    +@example \\property Staff.whichBar = \"|:\" - +@end example will create a start-repeat bar in this staff only ") (translator-property-description 'staffsFound list? "list of all staff-symbols found.") @@ -277,7 +296,7 @@ put on top of all staffs, and appears only at left side of the staff." prefatory matter (clefs, key signatures) appears, eg. this puts the key signatures after the bar lines: - +@example \\property Score.breakAlignOrder = #'( Span_bar Breathing_sign @@ -286,7 +305,7 @@ key signatures after the bar lines: Key_item Time_signature ) - +@end example ") ))) @@ -307,7 +326,7 @@ key signatures after the bar lines: "Chord_name_engraver" "Catch Note_req's, Tonic_reqs, Inversion_reqs, Bass_req and generate the appropriate chordname." - '(ChordNames) + '(ChordName) (list (translator-property-description 'chordInversion boolean? " Determines whether LilyPond should look for chord inversions when translating from notes to chord names. Set to 1 to find @@ -411,7 +430,7 @@ If omitted, then dots appear on top of the notes. property is used to label subsequent lines. If the @code{midiInstrument} property is not set, then @code{instrument} is used to determine the instrument for MIDI output.") - (translator-property-description 'instr string? "see instrument") + (translator-property-description 'instr string? "see @code{instrument}") ))) (cons @@ -559,15 +578,17 @@ squashing.") "Property_engraver" "This is a engraver that converts \property settings into back-end element-property settings. Example: Voice.stemLength will set -#'length in all Stem objects

    +#'length in all Stem objects. + Due to CPU and memory requirements, the use of this engraver is deprecated." '() (list (translator-property-description 'Generic_property_list list? "description of the conversion. -

    - Defines names and types for generic properties. These are properties - than can be plugged into the backend directly. See the init file - @file{generic-property.scm} for details. For internal use only, deprecated. + +Defines names and types for generic properties. These are properties +than can be plugged into the backend directly. See the init file +@file{generic-property.scm} for details. For internal use only, +deprecated. ") ))) @@ -664,8 +685,8 @@ Description of scripts to use. (fixme) '(Slur) (list - (translator-property-description 'slurBeginAttachment symbol? "") - (translator-property-description 'slurEndAttachment symbol? "") + (translator-property-description 'slurBeginAttachment symbol? "translates to the car of Slur.element-property 'attachment.") + (translator-property-description 'slurEndAttachment symbol? "translates to the cdr of Slur.element-property 'attachment.") (translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set") ))) @@ -699,7 +720,7 @@ arpeggios that cross staffs. (engraver-description "Span_bar_engraver" "This engraver makes cross-staff barlines: It catches all normal -bar lines, and draws a single span-bar across them.

    " +bar lines, and draws a single span-bar across them." '(SpanBar) (list @@ -797,7 +818,7 @@ either unison, unisilence or soloADue is set" 'Time_signature_engraver (engraver-description "Time_signature_engraver" - "Create a TimeSignature whenever timeSignatureFraction changes" + "Create a TimeSignature whenever @code{timeSignatureFraction} changes" '(TimeSignature) (list ))) @@ -838,12 +859,15 @@ defaultBarType, barAlways, barNonAuto and measurePosition. notes and rests expand into their full length, printing the appropriate number of empty bars so that synchronization with other voices is preserved. - -@mudela[fragment,verbatim,center] + +@c my @vebatim patch would help... +@example +@@mudela[fragment,verbatim,center] r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3 -@end mudela - +@@end mudela +@end example + ") (translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc? Switch off for cadenzas.") @@ -870,14 +894,15 @@ every barline. Normally a tuplet bracket is as wide as the @code{\times} expression that gave rise to it. By setting this property, you can make brackets last shorter. Example -

    -@mudela[verbatim,fragment] -\context Voice \times 2/3 { + +@example +@@mudela[verbatim,fragment] +\context Voice \times 2/3 @{ \property Voice.tupletSpannerDuration = #(make-moment 1 4) [c8 c c] [c c c] -} -@end mudela - +@} +@@end mudela +@end example ") (translator-property-description 'tupletInvisible boolean? " If set to true, tuplet bracket creation is switched off -- 2.39.2