From 2086beff8cd9949318c97a2a531edb8f04f45f8c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 21 Apr 2003 00:26:26 +0000 Subject: [PATCH] * Documentation/user/GNUmakefile ($(outdir)/lilypond-internals/lilypond-internals.html): copy ly files too. * scm/document-markup.scm: new file: document all markup functions. * scm/documentation-generate.scm: rename all documentation modules to document-*.scm * scripts/lilypond-book.py: generate link to .ly file iso. link to .png --- ChangeLog | 13 ++++++ Documentation/user/GNUmakefile | 4 +- Documentation/user/macros.itexi | 2 + Documentation/user/refman.itely | 43 ++++++++++++++----- ly/generate-documentation.ly | 2 +- ...mentation-lib.scm => document-backend.scm} | 0 ...cumentation.scm => document-functions.scm} | 0 scm/document-markup.scm | 36 ++++++++++++++++ ...cumentation-lib.scm => document-music.scm} | 0 ...ation-lib.scm => document-translation.scm} | 0 ...ntation.scm => documentation-generate.scm} | 10 +++-- scm/lily.scm | 3 ++ scm/new-markup.scm | 8 ++-- scripts/lilypond-book.py | 6 +-- 14 files changed, 103 insertions(+), 24 deletions(-) rename scm/{backend-documentation-lib.scm => document-backend.scm} (100%) rename scm/{function-documentation.scm => document-functions.scm} (100%) create mode 100644 scm/document-markup.scm rename scm/{music-documentation-lib.scm => document-music.scm} (100%) rename scm/{engraver-documentation-lib.scm => document-translation.scm} (100%) rename scm/{generate-documentation.scm => documentation-generate.scm} (92%) diff --git a/ChangeLog b/ChangeLog index de76c2ad0c..ee2eadd181 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2003-04-21 Han-Wen Nienhuys + * Documentation/user/GNUmakefile + ($(outdir)/lilypond-internals/lilypond-internals.html): copy ly + files too. + + * scm/document-markup.scm: new file: document all markup + functions. + + * scm/documentation-generate.scm: rename all documentation modules + to document-*.scm + + * scripts/lilypond-book.py: generate link to .ly file iso. link to + .png + * input/test/divisiones.ly: added * input/regression/output-property.ly: new file diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index bb78b9dbf2..f0b566c5ff 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -64,14 +64,14 @@ extra-local-help: $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi mkdir -p $(dir $@) $(MAKEINFO) --output=$@ --html $< - -cp -f $(outdir)/*.png $(outdir)/lilypond + -cp -f $(outdir)/*.{png,ly} $(outdir)/lilypond -cp -f $(outdir)/lilypond/index.html $@ $(deep-footify) $(shell find $(outdir)/$(*F)/*.html) $(outdir)/lilypond-internals/lilypond-internals.html: $(outdir)/lilypond-internals.texi mkdir -p $(dir $@) $(MAKEINFO) --output=$@ --html $< - -cp -f $(outdir)/*.png $(outdir)/lilypond-internals + -cp -f $(outdir)/*.{png,ly} $(outdir)/lilypond-internals -cp -f $(outdir)/lilypond-internals/index.html $@ $(deep-footify) $(shell find $(outdir)/$(*F)/*.html) diff --git a/Documentation/user/macros.itexi b/Documentation/user/macros.itexi index eef33e29cc..85fd263d68 100644 --- a/Documentation/user/macros.itexi +++ b/Documentation/user/macros.itexi @@ -134,6 +134,8 @@ internals document, @internalsref{\NAME\} @macro refbugs @strong{BUGS} + + @end macro @macro seealso diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 455ed4dfb6..4ecdcefc55 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -151,6 +151,11 @@ octave; each @code{,} lowers the pitch by an octave. c' c'' es' g' as' gisis' ais' @end lilypond + +@seealso + +@internalsref{NoteEvent}, @internalsref{NoteHead} + @node Chromatic alterations @subsection Chromatic alterations @@ -196,6 +201,7 @@ keyword appended. Rest collision testing will leave these rests alone. a'4\rest d'4\rest @end lilypond +@internalsref{RestEvent}, @internalsref{Rest} @c FIXME: naming. @@ -228,6 +234,9 @@ which will work outside of those two modes: The skip command is merely an empty musical placeholder. It does not produce any output, not even transparent output. +@seealso + +@internalsref{SkipEvent} @@ -369,8 +378,8 @@ give optimal results. @c FIXME: This subsection does not belong in @ref{Note entry}. LilyPond can automatically converting long notes to tied notes. This -is done by replacing the @code{Note_heads_engraver} by the -@code{Completion_heads_engraver}. +is done by replacing the @internalsref{Note_heads_engraver} by the +@internalsref{Completion_heads_engraver}. @lilypond[verbatim,noindent] \score{ @@ -3118,7 +3127,7 @@ print them as name. @menu * Chords mode:: -* Printing chord names:: +* Printing chord names:: @end menu @@ -4425,7 +4434,7 @@ The following example (from @inputfileref{input/regression,cluster.ly}) shows what the result looks like. -@lilypondfile{cluster.ly} +@lilypondfile[notexidoc]{cluster.ly} By default, @internalsref{Cluster_engraver} is in the @internalsref{Voice} context. This allows putting ordinary notes and @@ -4487,7 +4496,6 @@ music notation, are supported See @ref{Articulations} for general instructions how to apply scripts such as fermatas to a @code{\notes@{@}} block. - @node Tuning output @section Tuning output @@ -4508,8 +4516,9 @@ affecting a whole set of objects. Second, you can select one specific object, and set a object property in that object. @menu -* Tuning groups of objects :: * Tuning per object :: +* Tuning objects :: +* Outputproperty:: * Font selection:: * Text markup:: @end menu @@ -4676,7 +4685,7 @@ LilyPond may crash. @node Outputproperty - +@subsection Outputproperty @cindex \outputproperty @@ -4983,14 +4992,10 @@ their center lines. c1^\markup { \line << a b c >> } @end lilypond - - The markup mechanism is very flexible and extensible. Refer to @file{scm/new-markup.scm} for more information on extending the markup mode. -[TODO: generate markup doco automatically.] - @cindex metronome mark One practical application of complicated markup is to fake a metronome @@ -5012,6 +5017,10 @@ eighthNote = \markup } @end lilypond +@seealso + +@internalsref{Markup functions}, @file{scm/new-markup.scm} + @refbugs @cindex kerning @@ -5190,6 +5199,12 @@ must be overriden from the @code{\paper} block, e.g. @end example +@seealso + +@internalsref{SpacingSpanner}, @internalsref{NoteSpacing}, +@internalsref{StaffSpacing}, @internalsref{SeparationItem}, +@internalsref{SeparatingGroupSpanner}. + @refbugs Spacing is determined on a score wide basis. If you have a score that @@ -5215,6 +5230,7 @@ kneed stems. + @node Font Size @subsection Font size @cindex font size, setting @@ -5274,6 +5290,11 @@ If you want linebreaks at regular intervals, you can use the following: This makes the following 28 measures (assuming 4/4 time) be broken every 4 measures. +@seealso + +@internalsref{BreakEvent} + + @node Page layout @subsection Page layout diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly index 2666360e23..5e0da04748 100644 --- a/ly/generate-documentation.ly +++ b/ly/generate-documentation.ly @@ -4,4 +4,4 @@ % Running LilyPond on this file generates the documentation % #(ly:set-option 'parse-protect #f) -#(load-from-path "generate-documentation.scm") +#(load-from-path "documentation-generate.scm") diff --git a/scm/backend-documentation-lib.scm b/scm/document-backend.scm similarity index 100% rename from scm/backend-documentation-lib.scm rename to scm/document-backend.scm diff --git a/scm/function-documentation.scm b/scm/document-functions.scm similarity index 100% rename from scm/function-documentation.scm rename to scm/document-functions.scm diff --git a/scm/document-markup.scm b/scm/document-markup.scm new file mode 100644 index 0000000000..1db87f01b0 --- /dev/null +++ b/scm/document-markup.scm @@ -0,0 +1,36 @@ + +(define (doc-markup-function func) + (let* + ( + (doc-str (procedure-documentation func) ) + (f-name (symbol->string (procedure-name func))) + (sig (object-property func 'markup-signature)) + (sig-str (string-join (map type-name sig) " ")) + ) + + + + (string-append + "\n\n@b{" + f-name + "}\n\n@findex " f-name "\n" + "\n\n@i{Argument types}: " sig-str + (if (string? doc-str) + (string-append + "\n\n@i{Description}: \n\n" + doc-str) + "") + + + ))) + + +(define (markup-doc-node) + (make + #:name "Markup functions" + #:desc "Definitions of the markup functions" + #:text (apply string-append + (map doc-markup-function markup-function-list) ) + )) + + diff --git a/scm/music-documentation-lib.scm b/scm/document-music.scm similarity index 100% rename from scm/music-documentation-lib.scm rename to scm/document-music.scm diff --git a/scm/engraver-documentation-lib.scm b/scm/document-translation.scm similarity index 100% rename from scm/engraver-documentation-lib.scm rename to scm/document-translation.scm diff --git a/scm/generate-documentation.scm b/scm/documentation-generate.scm similarity index 92% rename from scm/generate-documentation.scm rename to scm/documentation-generate.scm index 4e84ab7aec..0575f483a4 100644 --- a/scm/generate-documentation.scm +++ b/scm/documentation-generate.scm @@ -18,10 +18,11 @@ ;;;;;;;;;;;;;;;; (define load-files '("documentation-lib.scm" - "function-documentation.scm" - "engraver-documentation-lib.scm" - "music-documentation-lib.scm" - "backend-documentation-lib.scm" + "document-functions.scm" + "document-translation.scm" + "document-music.scm" + "document-backend.scm" + "document-markup.scm" )) (map ly:load load-files) @@ -95,6 +96,7 @@ (translation-doc-node) (backend-doc-node) (all-scheme-functions-doc) + (markup-doc-node) (make #:name "Index" #:text " diff --git a/scm/lily.scm b/scm/lily.scm index df687d0f6b..65c861cca7 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -288,8 +288,11 @@ is the first to satisfy CRIT ;;;;;;;;;;;;;;;; ; strings. + +;; TODO : make sep optional. (define-public (string-join str-list sep) "append the list of strings in STR-LIST, joining them with SEP" + (apply string-append (list-insert-separator str-list sep)) ) diff --git a/scm/new-markup.scm b/scm/new-markup.scm index 5cccdc2697..cafc755904 100644 --- a/scm/new-markup.scm +++ b/scm/new-markup.scm @@ -411,7 +411,7 @@ for the reader. ;; (define markup? cheap-markup?) -(define markup-function-list +(define markup-functions-and-signatures (list ;; abs size @@ -470,7 +470,9 @@ for the reader. (set-object-property! (car x) 'markup-signature (cdr x)) (set-object-property! (car x) 'markup-keyword (markup-signature-to-keyword (cdr x))) ) - markup-function-list) + markup-functions-and-signatures) + +(define-public markup-function-list (map car markup-functions-and-signatures)) ;; construct a @@ -560,7 +562,7 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function. ) (eval - (cons 'begin (map make-markup-maker markup-function-list)) + (cons 'begin (map make-markup-maker markup-functions-and-signatures)) markup-module ) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 248c2905ad..7578ef81a4 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -366,7 +366,7 @@ output_dict= { ## inline music doesn't. ## possibly other center options? 'output-html': r''' - + [picture of music] ''', }, @@ -448,7 +448,7 @@ output_dict= { \catcode`\@=0 @end tex @html -

+

[picture of music]

@end html @@ -461,7 +461,7 @@ output_dict= { \catcode`\@=0 @end tex @html - + [picture of music] @end html -- 2.39.2