]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.97 release/1.3.97
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Oct 2000 00:42:57 +0000 (02:42 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Oct 2000 00:42:57 +0000 (02:42 +0200)
============

* Made small fixes to basic properties: regression-test compiles.

* Moved Text_script_req's text_ member into mus-property.

* Renamed ChordName to ChordNames, for consistancy.

* Resurrected most of chord names, superscripting and kerning
  is currently broken, though.

* Junked all old style text lookups, except for feta definitions.

* Added support for name-based character lookups.

* Added support for font styles and papersize style sheets.

* Added new code for font selection and scm text markup.  Only used
  for testing in \textscript SCM. See input/test/markup.ly.

* Fixed (added actually, it got lost?) word-space for chords.

* Added slope-limit and attachment-offset properties to slur.

* Slur's broken trend now weighs in the number of note-columns.

* Spacing tweaks

1.3.96.h

12 files changed:
CHANGES
Documentation/index.texi
Documentation/user/GNUmakefile
VERSION
lily/GNUmakefile
lily/property-engraver.cc
ly/textscripts.ly [deleted file]
make/out/lilypond.lsm
make/out/lilypond.spec
scm/element-descriptions.scm
scm/generate-documentation.scm
scm/interface.scm

diff --git a/CHANGES b/CHANGES
index 51db323a62333f6025f6b0fd219eaae0a10b8c84..8c6ace17ad53388e54fc7e66d401238f40991b94 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,9 +3,6 @@
 
 * Made small fixes to basic properties: regression-test compiles.
 
-1.3.96.jcn9
-===========
-
 * Moved Text_script_req's text_ member into mus-property.
 
 * Renamed ChordName to ChordNames, for consistancy.
@@ -13,9 +10,6 @@
 * Resurrected most of chord names, superscripting and kerning
   is currently broken, though.
 
-1.3.96.jcn7
-===========
-
 * Junked all old style text lookups, except for feta definitions.
 
 * Added support for name-based character lookups.
@@ -31,7 +25,7 @@
 
 * Slur's broken trend now weighs in the number of note-columns.
 
-* Spacing tweaks
+* Spacing tweaks
 
 1.3.96.hwn1
 ===========
@@ -43,8 +37,9 @@
 * Solaris fix.
 
 * Type checking for \push and \pop; elt property description (docs
-inclusive) is now in Scheme. Preliminary auto-documentation in
-ly/generate-documentation.ly
+inclusive) is now in Scheme.
+
+* Self-documenting backend using ly/generate-documentation.ly
 
 
 1.3.95.jcn5
index 3b1f3e2258533804ad1559964489c63de2b1aac7..6ed47693cff9ae833a4f01e5e9a091dc6610f403 100644 (file)
@@ -22,6 +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 @uref{../user/out-www/backend.html,LilyPond backend reference}
 @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
index 6b7186af4beebaf159f9423fd5a19721005a81c7..98e71f00e625190be21af4f738aee823657d72fa 100644 (file)
@@ -28,12 +28,14 @@ dvi: $(DVI_FILES)
 ps: $(PS_FILES)
 
 # urg
-default:
+default: 
 
-local-WWW: $(HTML_FILES)   $(datafiles) $(PS_GZ_FILES)
-       $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
-          $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
-         | sed "s!$(outdir)/!!g" > $(outdir)/index.html
+local-WWW: $(HTML_FILES)   $(datafiles) $(PS_GZ_FILES) backdoc
+       true
+
+#      $(PYTHON) $(step-bindir)/ls-latex.py --title 'User documentation' \
+#         $(DOC_FILES) $(TEX_FILES) $(TELY_FILES) \
+#        | sed "s!$(outdir)/!!g" > $(outdir)/index.html
 
 $(outdir)/%.bib: %.bib
        ln -f $< $@
@@ -42,3 +44,7 @@ $(outdir)/%.bib: %.bib
 
 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)
diff --git a/VERSION b/VERSION
index b2a0012dcc0ea360ee1194aae72823a86aada395..23c4d593267f2eff88c5bc9b311a8cea795a4fc2 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=96
-MY_PATCH_LEVEL=jcn10
+PATCH_LEVEL=97
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 254cf67f787571f08304debd00632b8e1847a197..d81ea7813cdeaa1d58ea31c889d80a5a5e3009fd 100644 (file)
@@ -14,6 +14,10 @@ HELP2MAN_EXECS = lilypond
 STEPMAKE_TEMPLATES= c++ executable po help2man
 
 include $(depth)/make/stepmake.make 
+
+default: 
+
+
 # force these: Make can't know these have to be generated in advance
 $(outdir)/my-lily-parser.o: $(outdir)/parser.hh
 $(outdir)/my-lily-lexer.o: $(outdir)/parser.hh
index 2b511ff26166c68adbf2f6764345772308bf6c2e..67b48089a33ac2528ec1fb1f88e2c3b0c3716890 100644 (file)
@@ -125,7 +125,7 @@ Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*o
          
          SCM name = e->get_elt_property ("meta");
          name = scm_assoc (ly_symbol2scm ("name"), name);
-         scm_display (name, errport);
+         scm_display (gh_cdr(name), errport);
          scm_puts(" \\push #'",errport);
          scm_display (elt_prop_sym,errport);
          scm_puts ( " = #",errport);
diff --git a/ly/textscripts.ly b/ly/textscripts.ly
deleted file mode 100644 (file)
index e69de29..0000000
index 2ce63ea474510468722521424cf3c53a07f50493..c674df4239e800dd58e9e9b391a40f488e5289a8 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.96
-Entered-date: 13OKT00
+Version: 1.3.97
+Entered-date: 22OCT00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.96.tar.gz 
+       1000k lilypond-1.3.97.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.96.tar.gz 
+       1000k lilypond-1.3.97.tar.gz 
 Copying-policy: GPL
 End
index f1cbe8e9baf5a6ee1e200f473e75f0a177b3233a..8d1decf1a5b09ef343d27cd9f149bfb11247525f 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.96
+Version: 1.3.97
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.96.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.97.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index 504cdfc4cc8e6ff7be5ff11b3c3e5e36a0146227..80613065f48950c5702480e65f6763ca02da7945 100644 (file)
@@ -29,7 +29,7 @@
                (thin-kern . 3.0)
                (hair-thickness . 1.6)
                (thick-thickness . 6.0)
-               (meta . ,(element-description  "BarLine" bar-line-interface general-element-interface))
+               (meta . ,(element-description  "BarLine" bar-line-interface ))
        ))
 
        (BarNumber . (
@@ -43,7 +43,7 @@
                 (markup-to-properties . ,markup-to-properties)
                 (font-family . "roman")
                (meta . ,(element-description "BarNumber"
-                       text-interface general-element-interface break-aligned-interface))
+                       text-interface  break-aligned-interface))
        ))
 
        (Beam . ,basic-beam-properties)
@@ -73,7 +73,7 @@
                (molecule-callback . ,Breathing_sign::brew_molecule)
                (Y-offset-callbacks . (,Breathing_sign::offset_callback))
                (visibility-lambda . ,begin-of-line-invisible)
-               (meta . ,(element-description "BreathingSign" general-element-interface break-aligned-interface))
+               (meta . ,(element-description "BreathingSign"  break-aligned-interface))
        ))
 
        (Clef . (
@@ -83,7 +83,7 @@
           (break-align-symbol . Clef_item)
           (visibility-lambda . ,begin-of-line-visible)
           (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
-          (meta . ,(element-description "Clef" clef-interface break-aligned-interface general-element-interface))
+          (meta . ,(element-description "Clef" clef-interface break-aligned-interface ))
        ))
 
        (ChordNames . (
                (axes 0 1)
                (note-width . 1.65)
                (meta . ,(element-description "NoteCollision"
-                 general-element-interface note-collision-interface axis-group-interface
+                  note-collision-interface axis-group-interface
                ))
        ))
 
 
        (DotColumn . (
                (axes 0 )
-               (meta . ,(element-description "DotColumn" dot-column-interface general-element-interface axis-group-interface))
+               (meta . ,(element-description "DotColumn" dot-column-interface  axis-group-interface))
        ))
 
        (Dots . (
                (dot-count . 1)
                (staff-position . 0.0)
                (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
-               (meta . ,(element-description "Dots" dot-interface general-element-interface))
+               (meta . ,(element-description "Dots" dot-interface ))
        ))
        
        (DynamicText . (
                 (markup-to-properties . ,markup-to-properties)
                (self-alignment-Y . 0)
 
-               (meta . ,(element-description "DynamicText" text-interface general-element-interface))
+               (meta . ,(element-description "DynamicText" text-interface ))
        ))
        
        (DynamicLineSpanner . (
                (minimum-length .  0.5) 
                (molecule-callback . ,Hyphen_spanner::brew_molecule)
                (Y-extent-callback . ,Score_element::point_dimension_callback)
-               (meta . ,(element-description "LyricHyphen" lyric-hyphen-interface general-element-interface))
+               (meta . ,(element-description "LyricHyphen" lyric-hyphen-interface ))
        ))
        
        (InstrumentName . (
                (style-to-font-name . ,style-to-font-name)
                (markup-to-properties . ,markup-to-properties)
                (font-family . "roman")
-               (meta . ,(element-description "InstrumentName" general-element-interface text-interface break-aligned-interface))
+               (meta . ,(element-description "InstrumentName"  text-interface break-aligned-interface))
        ))
        
        (KeySignature . (
          (break-align-symbol . Key_item)
          (visibility-lambda . ,begin-of-line-visible)
          (breakable . #t)
-         (meta . ,(element-description "KeySignature" key-signature-interface general-element-interface break-aligned-interface))
+         (meta . ,(element-description "KeySignature" key-signature-interface  break-aligned-interface))
        ))
        
        (Accidentals . (
                (direction . -1)
                (left-padding . 0.2)
                (right-padding . 0.4)
-               (meta . ,(element-description "Accidentals" general-element-interface accidentals-interface))
+               (meta . ,(element-description "Accidentals"  accidentals-interface))
        ))
        
        (LineOfScore . (
                (axes . (0 1))
-               (meta . ,(element-description "LineOfScore" general-element-interface axis-group-interface))
+               (meta . ,(element-description "LineOfScore"  axis-group-interface))
        ))
        
        (LyricExtender . (
                (height . 0.8) ; stafflinethickness;
                (right-trim-amount . 0.5)
                (Y-extent-callback . ,Score_element::point_dimension_callback)
-               (meta . ,(element-description "LyricExtender" general-element-interface lyric-extender-interface))
+               (meta . ,(element-description "LyricExtender"  lyric-extender-interface))
        ))
        
        (LyricText . (
                (font-style . mark)
                 (visibility-lambda . ,end-of-line-invisible)
          (padding . 4.0)
-         (meta . ,(element-description "RehearsalMark" general-element-interface mark-interface side-position-interface))
+         (meta . ,(element-description "RehearsalMark"  mark-interface side-position-interface))
        ))
        
        (MultiMeasureRest . (
                (expand-limit . 10)
                (padding . 2.0) ; staffspace
                (minimum-width . 12.5) ; staffspace
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-family . "number")
-                (meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface general-element-interface))
+               (properties-to-font-name . ,properties-to-font-name)
+               (style-to-font-name . ,style-to-font-name)
+               (markup-to-properties . ,markup-to-properties)
+               (font-family . "number")
+               (meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface ))
        ))
        
        (NoteColumn . (
                (axes . (0 1))
-               (meta . ,(element-description "NoteColumn" general-element-interface axis-group-interface note-column-interface))
+               (meta . ,(element-description "NoteColumn"  axis-group-interface note-column-interface))
        ))
 
        (NoteHead . (
                (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
                (meta . ,(element-description  "NoteHead"
                        rhythmic-head-interface
-                       note-head-interface general-element-interface))
+                       note-head-interface ))
        ))
 
        (NoteName . (
                 (style-to-font-name . ,style-to-font-name)
                 (markup-to-properties . ,markup-to-properties)
 
-               (meta . ,(element-description "OctavateEight" text-interface general-element-interface))
+               (meta . ,(element-description "OctavateEight" text-interface ))
        ))
        
        (PaperColumn . (
                (minimum-beam-collision-distance . 1.5)
                (meta . ,(element-description  "Rest"
                        rhythmic-head-interface
-                       rest-interface general-element-interface))
+                       rest-interface ))
        ))
        (RestCollision . (
                (minimum-distance . 0.75)
-               (meta . ,(element-description "RestCollision" rest-collision-interface general-element-interface))
+               (meta . ,(element-description "RestCollision" rest-collision-interface ))
        ))
 
        (Script . (
 
                ;; assume that notes at least this long are present.
                (maximum-duration-for-spacing . ,(make-moment 1 8))
-               (meta . ,(element-description "SpacingSpanner" general-element-interface spacing-spanner-interface))
+               (meta . ,(element-description "SpacingSpanner"  spacing-spanner-interface))
        ))
        (SpanBar . (
 
                (thin-kern . 3.0)
                (hair-thickness . 1.6)
                (thick-thickness . 6.0)
-               (meta . ,(element-description "SpanBar" span-bar-interface bar-line-interface general-element-interface))
+               (meta . ,(element-description "SpanBar" span-bar-interface bar-line-interface ))
        ))
 
        (StanzaNumber . (
                (molecule-callback . ,Staff_symbol::brew_molecule)
                (staff-space . 1.0)
                (line-count . 5 )
-               (meta . ,(element-description "StaffSymbol" staff-symbol-interface general-element-interface))
+               (meta . ,(element-description "StaffSymbol" staff-symbol-interface ))
        ))
        (SostenutoPedal . (
                (molecule-callback . ,Text_item::brew_molecule)
                 (markup-to-properties . ,markup-to-properties)
                
                (self-alignment-X . 0)
-               (meta . ,(element-description "SostenutoPedal" text-interface general-element-interface))
+               (meta . ,(element-description "SostenutoPedal" text-interface ))
        ))
 
        (Stem . (
                ; if stem is on middle line, choose this direction.
                (default-neutral-direction . 1)
                (X-offset-callbacks . (,Stem::off_callback))            
-               (meta . ,(element-description  "Stem" stem-interface general-element-interface))
+               (meta . ,(element-description  "Stem" stem-interface ))
        ))
 
        (StemTremolo . (
                (beam-width . 2.0) ; staff-space
                (beam-thickness . 0.42) ; staff-space
                (beam-space-function . ,default-beam-space-function)
-               (meta . ,(element-description "StemTremolo" stem-tremolo-interface general-element-interface))
+               (meta . ,(element-description "StemTremolo" stem-tremolo-interface ))
        ))
 
        (SeparationItem . (
-               (meta . ,(element-description "SeparationItem" separation-item-interface general-element-interface))
+               (meta . ,(element-description "SeparationItem" separation-item-interface ))
        ))
        (SeparatingGroupSpanner . (
                (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
                (arch-width . 1.5)
                (bracket-thick . 0.25)
                (bracket-width . 2.0)
-               (meta . ,(element-description "SystemStartDelimiter" system-start-delimiter general-element-interface))
+               (meta . ,(element-description "SystemStartDelimiter" system-start-delimiter ))
        ))
 
        (TextScript . (
                (molecule-callback . ,Text_item::brew_molecule)
                (no-spacing-rods . #t)
                (padding . 0.5)
-               (properties-to-font-name . ,properties-to-font-name)
-                (style-to-font-name . ,style-to-font-name)
-                (markup-to-properties . ,markup-to-properties)
-               (font-family . "roman")
-               (meta . ,(element-description "TextScript" text-script-interface text-interface side-position-interface general-element-interface))
+               (properties-to-font-name . ,properties-to-font-name)
+               (style-to-font-name . ,style-to-font-name)
+               (markup-to-properties . ,markup-to-properties)
+               (font-family . "roman")
+               (meta . ,(element-description "TextScript" text-script-interface text-interface side-position-interface ))
        ))
        (TextSpanner . (
                (molecule-callback . ,Text_spanner::brew_molecule)
                 (markup-to-properties . ,markup-to-properties)
                (type . "line")
                (direction . 1)
-               (meta . ,(element-description "TextSpanner" text-spanner-interface general-element-interface))          
+               (meta . ,(element-description "TextSpanner" text-spanner-interface ))           
        ))
        (Tie . (
                (molecule-callback . ,Tie::brew_molecule)
                (thickness . 1.2)
                (x-gap . 0.2)
                (minimum-length  . 2.5)
-               (meta . ,(element-description "Tie" tie-interface general-element-interface))
+               (meta . ,(element-description "Tie" tie-interface ))
        ))
 
        (TieColumn . (
                (after-line-breaking-callback . ,Tie_column::after_line_breaking)
-               (meta . ,(element-description "TieColumn" tie-column-interface general-element-interface))
+               (meta . ,(element-description "TieColumn" tie-column-interface ))
        ))
 
        (TimeSignature . (
                 (markup-to-properties . ,markup-to-properties)
                 (font-style . timesig)
                
-               (meta . ,(element-description "TimeSignature" time-signature-interface general-element-interface))
+               (meta . ,(element-description "TimeSignature" time-signature-interface ))
        ))
 
        (TupletBracket . (
                 (markup-to-properties . ,markup-to-properties)
                 (font-shape . "italic")
                (meta .  ,(element-description "TupletBracket"
-                         general-element-interface tuplet-bracket-interface))
+                          tuplet-bracket-interface))
        ))
 
        (UnaChordaPdeal . (
                (Y-offset-callbacks .
                 (,Side_position::aligned_side
                  ,Side_position::centered_on_parent))
-               (meta . ,(element-description "UnaChordaPedal" text-interface general-element-interface))
+               (meta . ,(element-description "UnaChordaPedal" text-interface ))
        ))
 
        (VoltaBracket . (
index 345e4da4ed853b8c2d4c37e6b763cb4b2e468f7a..9f33bdf1e7f2432d5f569578861de0e802d85062 100644 (file)
@@ -1,4 +1,10 @@
 
+;;;; 
+;
+; This file generates documentation for the backend of lilypond.
+;
+;;;;
+
 
 (define (uniqued-alist  alist acc)
   (if (null? alist) acc
          (uniqued-alist (cdr alist) (cons (car alist) acc)
   ))))
 
-
 ;;; TODO
 
 (define (wordwrap string)
   ""
   )
   
-
 (define (self-evaluating? x)
-  (or (number? x) (string? x))
+  (or (number? x) (string? x) (procedure? x))
   )
-      
+
 (define (type-name  predicate)
   (cond
    ((eq? predicate dir?) "direction")
    ((eq? predicate list?) "list")
    ((eq? predicate symbol?) "symbol")
    ((eq? predicate string?) "string")
-   ((eq? predicate boolean?) "string")   
+   ((eq? predicate boolean?) "string")
    ((eq? predicate number?) "number")
+   ((eq? predicate char?) "char")
+   ((eq? predicate input-port?) "input port")
+   ((eq? predicate output-port?) "output port")   
+   ((eq? predicate vector?) "vector")
    ((eq? predicate procedure?) "procedure") 
    (else "(unknown)")
   ))
 
+(define (htmlfy x)
+  (let*
+      ((x1 (regexp-substitute/global #f ">" x 'pre "&gt;" 'post))
+       (x2 (regexp-substitute/global #f "<" x1 'pre "&lt;" 'post))
+       )
+    x2))
+
 (define (scm->string val)
   (string-append
    (if (self-evaluating? val) "" "'")
-   (call-with-output-string (lambda (port) (display val port)))
+   (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)) ") -- "
+     "\n<li><code>" (symbol->string (car prop)) "</code> (" (type-name (cadr prop)) ") -- "
      (caddr prop)
-     "\ndefault value:  "
+     "<br>default value:  <code>"
      (if (pair? handle)
         (scm->string (cdr handle))
         "not set"
         )
-     "\n"
+     "</code>\n"
   )
   ))
 
-;;
-;; todo: setup ifaces differently.
-;;
+(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
+     "<hr>"
+     "<h2>Interface: " (symbol->string name) "</h2>\n"
+     desc
+     "<hr>\n<ul>"
+     (apply string-append docs)
+     "</ul>"
+     )
+    ))
+
+;
+; generate HTML, return filename.
+;
 (define (document-element description)
   (let* ((metah (assoc 'meta description))
         (meta (if (pair? metah)
                   ))
         
         (name (cdr (assoc 'name meta)))
-;       (iface-descs (cdr (assoc 'interface-descriptions meta)))
-        (propdesc (cdr (assoc 'properties meta)))
-        (docs (map (lambda (x) (document-property x description))
-                   (uniqued-alist propdesc '())))
+        (ifaces (cdr (assoc 'interface-descriptions meta)))
+        (ifacedoc (map (lambda (x) (document-interface x description))
+                               ifaces))
+        (outname  (string-append name ".html"))
+        (out (open-output-file outname))
         )
-
-    (string-append
-     "\n-------------------------\n"
-     name "\n"
-     "-------------------------\n"
-     "INTERFACES\n"
-     "(todo)\n"
-     ; (apply string-append iface-descs)
-     "-------------------------\n"
-     "PROPERTIES:\n"
-     (apply string-append docs)
+    (display (string-append "Writing " outname " ... \n") (current-error-port))
+    (display
+     (string-append "<title>LilyPond Element " name " </title>"
+                   "<h1>" name "</h1>"
+                   (apply string-append ifacedoc))
+     out)
+    outname
     )
-  ))
-
+  )
 
 (define (document-elements elts)
-  (string-append
-   (map (lambda (x) (display (car x)) (document-element (cdr x)))
-       elts
+  (let* ((files (map (lambda (x) (document-element (cdr x)))
+                   elts))
+       (outname  (string-append "backend.html"))
+       (out (open-output-file outname))
+       (l (map (lambda (x) (string-append
+                            "<li><a href=" x ">" x "</a>\n"))
+               files))
        )
-   ))
-
-(define (test-module )
-  (display
-   (list
-  (scm->string '(1 2 abc))
-  (scm->string +)
-  (type-name number?)
-  (uniqued-alist '((a . 1 ) (a . 1)) '() )
-  )))
 
+       (display
+        (string-append
+         "<title>LilyPond backend documentation</title>"
+         "<h1>LilyPond backend documentation</h1>"
+         "<ul>"
+         (apply string-append l)
+         "</ul>"
+       )
+        out
+        )
+   ))
 
+; (display (document-interface stem-interface '()))
 ; (define b (cdr (assoc 'Beam all-element-descriptions)))
 ;(display b)
 
-; (display (document-element  b))
+;(document-element  b)
 
-(display (document-elements all-element-descriptions))
+(document-elements all-element-descriptions)
 
index c5dc2d9d5596ad53cf7ba8b669ef47a762acb3ce..d44e4cc729d9677216e182ae3233fa9e13fbc1c0 100644 (file)
@@ -7,12 +7,13 @@
   (list symbol type? description))
   
 (define (lily-interface symbol description props)
-  (list (list symbol)
-       (list description)
+  (list symbol
+       description
        props
        )
   )
 
+
 (define (merge-interfaces ifs)
    (list
     (apply append (map car ifs))
     (apply append (map caddr ifs))
   ))
 
+(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 (element-description name . interfaces)
-  (let ((merged (merge-interfaces interfaces)))
+  (let* ((ifs (cons general-element-interface interfaces))
+        (props (map caddr ifs))
+        (syms (map car ifs))
+       )
     (list (cons 'separator "\n\n\n")   ;easy printing.
          (cons 'name name)
-         (cons 'interfaces (car merged))
+         (cons 'interfaces syms)
+         (cons 'interface-descriptions ifs)
          ; (cons 'interface-descriptions (cadr merged))
          ;; description of the element itself?
-         (cons 'properties (caddr merged))
+         (cons 'properties (apply append props))
   )))
 
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;;;
 
 (define general-element-interface