]> git.donarmstrong.com Git - lilypond.git/commitdiff
(interface-doc): prune Grob
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 14 Feb 2004 00:47:44 +0000 (00:47 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 14 Feb 2004 00:47:44 +0000 (00:47 +0000)
documentation: don't duplicate interface information.

33 files changed:
ChangeLog
Documentation/user/refman.itely
input/regression/drums.ly
input/regression/staff-mixed-size.ly
input/test/maximum-rest-count.ly [deleted file]
lily/balloon.cc
lily/grob.cc
lily/lyric-hyphen.cc
lily/script.cc
lily/separating-group-spanner.cc
lily/slur.cc
lily/spacing-spanner.cc
lily/span-bar.cc
lily/spanner.cc
lily/staff-spacing.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stem.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/text-item.cc
lily/tie-column.cc
lily/tie.cc
lily/translator-property.cc
scm/define-grob-interfaces.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-translator-properties.scm
scm/document-backend.scm
scm/document-music.scm
scm/document-translation.scm
scm/documentation-lib.scm
scm/lily.scm

index 1618a1a47f9520b2b3ea6b26a3a30071d064bf62..f9064b946404df88c8f29bf358e1020ea04d4500 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-02-14  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * scm/document-backend.scm (interface-doc): prune Grob
+       documentation: don't duplicate interface information.
+
+       * lily/*.cc: lots of updates of doc strings.
+
 2004-02-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * input/test/ac-extra-voice.ly (accompany): remove file.
index f99bc22fbf66cfc046d8a43b980d3147db342b33..83f8349c5ca891ff2fbcd64a125df46126dafbab 100644 (file)
@@ -1438,10 +1438,9 @@ whether the rule applies to begin or end-points.  The quantity
 @var{p}/@var{q} refers to the length of the beamed notes (and `@code{*
 *}' designates notes of any length), @var{n}/@var{M} refers to a time
 signature (wildcards `@code{* *}' may be entered to designate all time
-signatures), var{a}/var{b} is a duration. 
-By default, this command changes setting for the current voice. It is
-also possible to adjust settings at higher contexts, by adding a
-@var{context} argument.
+signatures), @var{a}/@var{b} is a duration.  By default, this command
+changes settings for the current voice. It is also possible to adjust
+settings at higher contexts, by adding a @var{context} argument.
 
 For example, if automatic beams should end on every quarter note, use
 the following:
index 6314dec18d4e4bfdc4b234529a00aced63bca038..6631b280af37360ebbbeb47a2d31a2999926cde9 100644 (file)
@@ -4,7 +4,7 @@
 }
 
 
-\version "2.1.22"
+\version "2.1.23"
 
 drh = \drums { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
 drl = \drums {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
@@ -15,8 +15,8 @@ timb = \drums \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8
     <<
        \new DrumStaff \with {
            drumStyleTable = #timbales-style
-           StaffSymbol \override #'line-count = #2
-           BarLine \override #'bar-size = #2
+           \override StaffSymbol #'line-count = #2
+           \override BarLine #'bar-size = #2
        } <<
            \set Staff.instrument = "timbales"
            \timb
index d490ea96ee9eb254271a3ea859404ee1aa241897..37820499dd934933d4880677c7e2953d1b1074c9 100644 (file)
@@ -6,13 +6,13 @@ factor, objects generally become too thick or too large.
 "
 
 }
-\version "2.1.22"
+\version "2.1.23"
 
 \score {
   <<
     \new Staff \with {
       fontSize = #-4
-      StaffSymbol \set #'staff-space = #(magstep -4)
+      \override StaffSymbol #'staff-space = #(magstep -4)
     }
     \notes \relative c' {
 \override DynamicText  #'extra-offset = #'(0 . 3)
diff --git a/input/test/maximum-rest-count.ly b/input/test/maximum-rest-count.ly
deleted file mode 100644 (file)
index 5c42c3a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-\version "2.1.22"
-% possible rename to rest-foo
-\header {
-    texidoc = "@cindex Rest Collision Count
-Control the number of rests in a collision with maximum-rest-count."
-}
-
-\score{
-\context Staff \notes\relative c''<<
-       \new Voice {
-               a4 
-               r 
-               \override Staff.RestCollision  #'maximum-rest-count = #1
-               r 
-               \override Staff.RestCollision  #'maximum-rest-count = #2
-               r 
-               \override Staff.RestCollision  #'maximum-rest-count = #3
-               r 
-               r8 r8
-               c
-       }
-       \new Voice {
-               c4
-               r
-               r 
-               r
-               r
-               r
-               r
-       }
-       \new Voice {
-               e4
-               r
-               r 
-               r
-               r
-               r
-               r
-       }
-       >>
-       \paper{ raggedright = ##t }
-}
-
index 6c29895f4b56a12b08039a6e7d37aaaf3da556db..000640754d513c9e7610877cc30205d073baf87e 100644 (file)
@@ -89,6 +89,6 @@ Balloon_interface::print (SCM smob)
 }
 
 ADD_INTERFACE (Balloon_interface,"text-balloon-interface",
-              "comic books.",
+              "A collection of routines to put text balloons around an object.",
               "balloon-padding balloon-text-props balloon-text-offset balloon-text balloon-original-callback");
 
index d44f3ce7c53aab0665404436af76107d698e7b4e..81df59f7531b4ff16ca578be3ae626fd3de9539a 100644 (file)
@@ -828,7 +828,7 @@ ADD_INTERFACE (Grob, "grob-interface",
 "Y-extent-callback print-function extra-offset spacing-procedure "
 "staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
 "meta layer before-line-breaking-callback "
-"after-line-breaking-callback extra-Y-extent minimum-X-extent X-extent Y-extent "
+"after-line-breaking-callback extra-Y-extent minimum-X-extent "
 "minimum-Y-extent transparent");
 
 
index 3691dedc624c126f1370a5e02297bb735d1cd789..5973bab2c40b20be73537c9568bf795c984faaa4 100644 (file)
@@ -99,11 +99,14 @@ Hyphen_spanner::set_spacing_rods (SCM smob)
   Spanner*sp = dynamic_cast<Spanner*> (me);
   r.distance_ =
     robust_scm2double (me->get_grob_property ("minimum-length"), 0);
+
   Direction d=LEFT;
-  do {
-    r.item_l_drul_[d] = sp->get_bound (d);
-    r.distance_ += r.item_l_drul_[d]->extent (r.item_l_drul_[d], X_AXIS)[-d];
-  } while (flip (&d) != LEFT);
+  do
+    {
+      r.item_l_drul_[d] = sp->get_bound (d);
+      r.distance_ += r.item_l_drul_[d]->extent (r.item_l_drul_[d], X_AXIS)[-d];
+    }
+  while (flip (&d) != LEFT);
 
   r.add_to_cols ();
   return SCM_UNSPECIFIED;
index 619f4e420baaea8ee5218b7783a89665b1cbfa6d..68ec61119f6f0aad27593ea9005f90836b9dd87a 100644 (file)
@@ -106,10 +106,10 @@ struct Skript
 };
 
 ADD_INTERFACE (Text_script,"text-script-interface",
-  "Any text script",
+  "An object that is put above or below a note",
   "script-priority");
 
 ADD_INTERFACE (Script_interface, "script-interface",
-  "",
+  "An object that is put above or below a note",
   "script-priority script-stencil");
 
index 868e49ecdd2cdb29a41c92a6b35ba8d2b36ce1f9..92d9cc236d4a7db2cf7bc41db88f898e3c016a1e 100644 (file)
@@ -77,6 +77,10 @@ SCM
 Separating_group_spanner::set_spacing_rods (SCM smob)
 {
   Grob*me = unsmob_grob (smob);
+
+  /*
+    Ugh: padding is added doubly, also for SeparationItem
+   */
   Real padding = robust_scm2double (me->get_grob_property ("padding"), 0.1);
   
   for (SCM s = me->get_grob_property ("elements"); gh_pair_p (s) && gh_pair_p (ly_cdr (s)); s = ly_cdr (s))
@@ -113,5 +117,6 @@ Separating_group_spanner::add_spacing_unit (Grob* me ,Item*i)
 
 
 ADD_INTERFACE (Separating_group_spanner,"separation-spanner-interface",
-  "Spanner that containing @code{separation-item-interface} grobs to calculate rods",
-  "");
+  "A spanner that calculates spacing constraints (\"rods\") "
+ "using the @code{separation-item-interface} grobs in @code{elements}.",
+  "elements padding");
index 9868d30b9c5cdf2d05a1df6422735124c00cf052..5e3916994e675ac9fae4031978403875dd4931c5 100644 (file)
@@ -560,6 +560,10 @@ Slur::print (SCM smob)
     return SCM_EOL;
 
   Stencil a;
+
+  /*
+    TODO: replace dashed with generic property.
+   */
   SCM d =  me->get_grob_property ("dashed");
   if (gh_number_p (d))
     a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
@@ -693,5 +697,5 @@ Slur::get_curve (Grob*me)
 
 ADD_INTERFACE (Slur,"slur-interface",
   "A slur",
-  "attachment attachment-offset beautiful control-points dashed details de-uglify-parameters direction extremity-rules extremity-offset-alist height-limit ratio slope-limit thickness y-free");
+  "attachment attachment-offset beautiful control-points dashed details de-uglify-parameters direction extremity-rules extremity-offset-alist height-limit note-columns ratio slope-limit thickness y-free");
 
index 1f18c4939a7033373dc971b72d504baf6d27127b..4399fc5051c13a920fe46c14c72d4307d6a04412 100644 (file)
@@ -930,7 +930,7 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
 ADD_INTERFACE (Spacing_spanner,"spacing-spanner-interface",
 "The space taken by a note is dependent on its duration. Doubling a\n"
 "duration adds spacing-increment to the space. The most common shortest\n"
-"note gets shortest-duration-space. Notes that are even shorter are\n"
+"note gets @code{shortest-duration-space}. Notes that are even shorter are\n"
 "spaced proportonial to their duration.\n"
 "\n"
 "Typically, the increment is the width of a black note head.  In a\n"
index a8b18623370fc475deacdc06677a28f6930c3167..97e581e938c58ae3ede5c55189dee4de3a2acc33 100644 (file)
@@ -241,7 +241,8 @@ Span_bar::get_bar_size (SCM smob)
 
 
 ADD_INTERFACE (Span_bar,"span-bar-interface",
-  "A bar line that spans other barlines (typically used to get cross-staff barlines.",
-  "");
+  "A bar line that spanned between other barlines. This interface is "
+              " used for  bar lines that connect different staves.",
+  "elements");
 
 
index 0a4a585d03a693b04c65541222e023353b311249..c94bb3de49f1e95b8100da2155712ef2269479a6 100644 (file)
@@ -367,10 +367,10 @@ unsmob_spanner (SCM s )
 
 ADD_INTERFACE(Spanner,
              "spanner-interface",
-"Other grobs have a shape that depends on the horizontal spacing. For\n"
+"Some objects are horizontally spanned between objects. For\n"
 "example, slur, beam, tie, etc. These grobs form a subtype called\n"
 "@code{Spanner}. All spanners have two span-points (these must be\n"
-"@code{Item}s), one on the left and one on the right. The left bound is\n"
+"@code{Item} objects), one on the left and one on the right. The left bound is\n"
 "also the X-reference point of the spanner.\n"
 ,
              "minimum-length");
index ddb26dd47b5b41629e51886a30080baa01a05c1b..6a7535f0309ea5400765731b1db260d67d38b08b 100644 (file)
@@ -242,5 +242,7 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
 
 
 ADD_INTERFACE (Staff_spacing,"staff-spacing-interface",
-  "",
+              "This object calculates spacing details from a "
+              " breakable symbol (left) to another object. For example, it takes care "
+              " of  optical spacing from  a bar lines to a note.",
   "stem-spacing-correction left-items right-items");
index cfb871d575cb4b8071da5d31f36214643312d5d1..cd4295e9af2929fbaeaccaa6aa39e7283c684190 100644 (file)
@@ -173,8 +173,8 @@ compare_position (Grob *const  &a, Grob * const &b)
 }
 
 ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface",
-  "Object whose Y position is meaning with reference to a staff "
-"symbol. Objects that have this interface should include "
-"Staff_symbol_referencer::callback in their Y-offset-callback. "
-,
-  "staff-position");
+              "Object whose Y position is meant relative to a staff "
+              "symbol. These objects usually have "
+              "Staff_symbol_referencer::callback in their Y-offset-callback. "
+              ,
+              "staff-position");
index ab0c72b0d52e5dfa96e3da8a1c4ff7abe7208335..bb0a9674c05b4bb6e2e1fa93c0144868be28295a 100644 (file)
@@ -122,8 +122,11 @@ Staff_symbol::get_ledger_line_thickness (Grob * me)
 
 
 ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
-  "This spanner draws the lines of a staff.  The center (i.e. middle line "
-"or space) is position 0. The length of the symbol may be set by hand "
-"through the @code{width} property. ",
+              "This spanner draws the lines of a staff. "
+              "A staff symbol definines a vertical unit, the staff space "
+              "Quantities that go by a half staff space are called positions "
+              "The center (i.e. middle line "
+              "or space) is position 0. The length of the symbol may be set by hand "
+              "through the @code{width} property. ",
               
   "ledger-line-thickness width staff-space thickness line-count");
index c0af303c0c9a31fcd0fd37dc1359fbe0199c6684..50c3b49fa02772dd9a69bf674e5027b2cc79d8f5 100644 (file)
@@ -970,7 +970,12 @@ Stem::beam_multiplicity (Grob *stem)
   these are too many props.
  */
 ADD_INTERFACE (Stem,"stem-interface",
-              "A stem",
+              "The stem represent the graphical  stem. "
+              "  In addition, it internally connects note heads, beams, tremolos. Rests "
+              " and whole notes have invisible stems."
+
+,
+              
               "tremolo-flag french-beaming "
               "avoid-note-head adjust-if-on-staffline thickness "
               "stem-info beamed-lengths beamed-minimum-free-lengths "
index e39b897cfc7cbea78ff9174c3f7917f361dbc808..f01ef8a37a4cb37b9a7156d15796ad30fed47543 100644 (file)
@@ -183,5 +183,8 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
 
 
 ADD_INTERFACE (System_start_delimiter,"system-start-delimiter-interface",
-  "#'style can be bar-line, bracket or brace",
-  "collapse-height thickness arch-height arch-angle arch-thick arch-width bracket-thick glyph");
+              "The brace, bracket or bar in front of the system. "
+              "It is implemented as a spanner"
+              ,
+              "collapse-height thickness "
+              "arch-height arch-angle arch-thick arch-width bracket-thick glyph");
index 5fce3e22998e8de4711b0ab3f9b5cb76af9e64f3..1d0c28ae4c6188cc0ca8170ae7e6c933de072f9c 100644 (file)
@@ -612,11 +612,7 @@ System::columns ()const
 
 
 ADD_INTERFACE (System,"system-interface",
-  "Super grob, parent of all: "
-"\n\n"
-"The columns of a score that form one line.  The toplevel grob.  Any "
-"grob has a Line_of_score as both X and Y reference point. The "
-"Paper_score contains one grob of this type. Control enters the "
-"Grob dependency calculation from this single Line_of_score "
-"object.",
-  "between-system-string all-elements columns");
+              "This is the toplevel object: each object in a score "
+              "ultimately has a System object as its X and Y parent. "
+              ,
+              "between-system-string all-elements columns");
index f45b66e068b14e2c229e8552530cf80692a7de65..3fe2d788f5174433d0a8332a6a6210436d163f31 100644 (file)
@@ -79,7 +79,7 @@ Text_item::markup_p (SCM x)
 }
 
 ADD_INTERFACE (Text_item,"text-interface",
-  "A scheme markup text, see @usermanref{Markup functions}.",
+  "A scheme markup text, see @usermanref{Text markup}.",
   "text baseline-skip word-space");
 
 
index 44208c234f7896e1509b5e6f77e4d289fac2a7fa..17ea197241e26f86137e55214eb8a17443dec393 100644 (file)
@@ -203,6 +203,6 @@ Tie_column::after_line_breaking (SCM smob)
 
 
 ADD_INTERFACE (Tie_column,"tie-column-interface",
-  "that sets tie directions in a tied chord",
+  "Object that sets directions of multiple ties in a tied chord",
   "direction");
 
index afdfd0240aa64c7110aa5ceb43a2a4d564da9aef..e95135b12dc620235a822057f57a15fb0b7fcabb 100644 (file)
@@ -355,6 +355,6 @@ Tie::print (SCM smob)
 
 
 ADD_INTERFACE (Tie,"tie-interface",
-  "A tie connecting two noteheads.\n"
-"direction = Forced direction for all ties",
+              "A tie connecting two noteheads.\n"
+              ,
   "y-offset staffline-clearance control-points head-pair details thickness x-gap direction minimum-length");
index 77414e7d8a0765f560096a319771ff91d4786b85..eaf82c3166275c650b4da23b2637fb4722aaaa49 100644 (file)
@@ -1,14 +1,14 @@
 /*   
-translator-property.cc --  implement manipulation of
+   translator-property.cc --  implement manipulation of
 
    immutable Grob property lists. 
 
-source file of the GNU LilyPond music typesetter
-
-(c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+   source file of the GNU LilyPond music typesetter
 
+   (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
  */
 
+#include "main.hh"
 #include "translator-group.hh"
 #include "warn.hh"
 #include "item.hh"
@@ -32,7 +32,7 @@ void
 execute_pushpop_property (Translator_group * trg,
                          SCM prop, SCM eltprop, SCM val)
 {
-  if (gh_symbol_p (prop))
+  if (gh_symbol_p (prop) && gh_symbol_p (eltprop))
     {
       if (val != SCM_UNDEFINED)
        {
@@ -101,6 +101,12 @@ execute_pushpop_property (Translator_group * trg,
            trg->internal_set_property (prop, gh_cons (new_alist, daddy));
        }
     }
+  else
+    {
+      warning ("Need symbol arguments for \\override and \\revert");
+      if (internal_type_checking_global_b)
+       assert (false);
+    }
 }
 
 /*
index 4cb87db2b3eab9160ab847646812a194e0ecd0c4..529433ae545f670bac789f1c7bc53ace5e9b9c38 100644 (file)
@@ -95,47 +95,13 @@ are interesting enough to maintain a hara-kiri staff."
 
 (ly:add-interface
  'stanza-number-interface
- ""
+ "A stanza number, to be put in from of a lyrics line"
  '()
  )
 
 ;;; todo: this is not typesetting info. Move to interpretation.
 (ly:add-interface
  'tablature-interface
- "tablature notes"
+ "An interface for any notes set in a tablature staff"
  '())
 
-
-;; todo: figure out where  to put this doco:
-
-"
-Grob properties form a name space where you can set variables per
-object.  Each object however, may have multiple functions. For
-example, consider a dynamic symbol, such @code{\ff} (fortissimo). It
-is printed above or below the staff, it is a dynamic sign, and it is a
-kind of text.
-
-To reflect this different functions of a grob, procedures and variables
-are grouped into so-called interfaces.  The dynamic text for example
-supports the  following interfaces:
-@table @code 
-@item font-interface
-  The glyph is built from characters from a font, hence the
-@code{font-interface}. For objects supporting @code{font-interface}, you
-can select alternate fonts by setting @code{font-style},
-@code{font-point-size}, etc.
-
-@item dynamic-interface
-  Dynamic interface is not associated with any variable or function in
-particular, but this makes it possible to distinguish this grob from
-other similar grobs (like @code{TextScript}), that have no meaning of
-dynamics.
-
-@item text-interface
-  This interface is for texts that are to be set using special routines
-to stack text into lines, using kerning, etc.
-
-@item general-grob-interface
-  This interface is supported by all grob types.
-@end table
-"
index 2b520fb25d20c4948232dab5e9ccb8e5a22a9f42..350049fdc0c7c20aeafe39e8bf70bb18ba3dde5c 100644 (file)
@@ -41,12 +41,8 @@ grob's parent. The last one in the list is called first.")
      (Y-offset-callbacks ,list? "see @code{X-offset-callbacks}.")
 
      (accidentals ,list? "List of alteration numbers.")
-     (add-cauda ,boolean? "does this flexa require an additional cauda on the left ,side?.")
-     (add-join ,boolean? "is this ligature head joined with the next one by a vertical ,line?")
-     (add-stem ,boolean? "is this ligature head a virga and therefore needs an additional stem on the right ,side?")
-     (adjust-if-on-staffline ,boolean? "If this grob is on a staff line, adjust its appearance, so that it better fits into the staff.  E.g., if set true on stem grobs, flares of mensural flags will always be aligned with the staff lines, regardless if the associated note head is printed on a staff line or inbetween.")
-     (after-line-breaking-callback ,procedure? "Procedure taking a grob as argument.
-This procedure is called (using dependency resolution) after line breaking. Return value is ignored.")
+
+     
      (align-dir ,ly:dir? "Which side to ,align? -1: left side, 0: around center of width, 1: right side.")
      (arch-angle ,number? "turning angle of the hook of a system brace" )
      (arch-height ,ly:dimension? "height of the hook of a system brace.")
@@ -54,16 +50,52 @@ This procedure is called (using dependency resolution) after line breaking. Retu
      (arch-width ,ly:dimension? "width of the hook of a system brace.")
      (arpeggio-direction ,ly:dir? "If set, put an
 arrow on the arpeggio squiggly line.")
-     (ascendens ,boolean? "is this neume of an ,ascending?.")
      (attachment ,pair? "cons of symbols
 indicating how a slur should be attached at the ends. The format is
 '(LEFT-TYPE . RIGHT-TYPE), where both TYPEs are symbols. The values of
 these symbols may be alongside-stem, stem, head or loose-end.")
      (attachment-offset ,pair? "cons of offsets,
-'(LEFT-offset . RIGHT-offset).  This offset is added to the
-attachments to prevent ugly slurs.  [fixme: we need more documentation here].
-.")
-     (auctum ,boolean? "is this neume ,augmented?.")
+'(@var{left-offset} . @var{right-offset}).  This offset is added to
+the attachments to prevent ugly slurs.  [fixme: we need more
+documentation here].")
+
+     ;; ancient notation
+
+     ;;;;;;; TODO:
+     ;; there are too many properties for ancient notation
+     ;; probably neume-types (a list of symbols) would also work.
+     
+     (auctum ,boolean? "is this neume augmented?")
+     (ascendens ,boolean? "is this neume of an ascending?")
+     (add-cauda ,boolean? "does this flexa require an additional cauda on the left side?")
+     (add-join ,boolean? "is this ligature head joined with the next one by a vertical line?")
+     (cavum ,boolean? "is this neume outlined?")
+     (descendens ,boolean? "is this neume of a descendent type?")
+     (deminutum ,boolean? "is this neume deminished?")
+     (flexa-height ,ly:dimension? "height of a flexa shape in a ligature grob in staff_space.")
+     (flexa-width ,ly:dimension? "width of a flexa shape in a ligature grob in staff_space.")
+     (join-heads ,boolean? "Whether to join the noteheads of an ambitus grob with a vertical line.")
+     (linea ,boolean? "attach vertical lines to this neume?")
+  
+     (add-stem ,boolean? "is this ligature head a virga and therefore needs an additional stem on the right side?")
+     (adjust-if-on-staffline ,boolean? "If this grob is on a staff line, adjust its appearance, so that it better fits into the staff.  E.g., if set true on stem grobs, flares of mensural flags will always be aligned with the staff lines, regardless if the associated note head is printed on a staff line or inbetween.")
+     (join-left ,boolean? "is this ligature head joined with the previous one by a vertical line?")
+     (context-info ,integer? "")
+     (inclinatum ,boolean? "is this neume an inclinatum?")
+     (note-head-style ,string? "name of the font character to be used as note heads in the ambitus grob.")
+     (oriscus ,boolean? "is this neume an oriscus?")
+     (quilisma ,boolean? "is this neume a quilisma?")
+     (pes-or-flexa ,boolean? "shall this neume be joined with the previous head?")
+     ;; DOCME
+     (prefix-set ,number? "")
+     (stropha ,boolean? "is this neume a stropha?")
+     (virga ,boolean? "is this neume a virga?")
+
+
+     ;; end ancient notation
+     
+
      (auto-knee-gap ,ly:dimension? "If a gap is found between noteheads
 where a  horizontal beam fits that is larger than this number,  make a kneed beam.")
      (axes ,list? "list of axis numbers.
@@ -83,7 +115,8 @@ original stencil drawer to draw the balloon around.")
      (bar-size-procedure ,procedure? "Procedure that computes the size of a bar line.")
      (base-shortest-duration ,ly:moment?
                             "Spacing is based on the shortest notes in a piece. Normally, pieces are spaced as if notes at least as short as this are present.")
-     (baseline-skip ,ly:dimension? "Baseline skip to use for multiple lines of text.")
+     (baseline-skip ,ly:dimension? "Distance between base lines of
+ multiple lines of text.")
      (beam-thickness ,ly:dimension? "thickness, measured in staffspace.")
      (beam-width ,ly:dimension? "width of the tremolo sign.")
      (beamed-lengths ,list? "list of stem lengths given beam multiplicity .")
@@ -104,15 +137,13 @@ This procedure is called (using dependency resolution) before line breaking, but
      (between-cols ,pair? "Where to attach a loose column to")
      (between-system-string ,string? "string
  to dump between two systems. Useful for forcing pagebreaks.")
-     (bracket-thick ,number? "width of a system start bracket. .")
+     (bracket-thick ,number? "width of a system start bracket.")
      (break-align-symbol ,symbol? "the index in the spacing table (symbol) of the to be aligned item.")
      (break-glyph-function ,procedure? "function taking glyph and break-direction, returning the glyph at a line break.")
-     (breakable ,boolean? "boolean indicating if this is a breakable item (clef, barline, key sig, etc.).")
+     (breakable ,boolean? "Is this is a breakable item (e.g. clef, barline)?")
      (c0-position ,integer? "integer indicating the position of central C.")
      (cautionary-style ,symbol? "style  of cautionary accidentals. Choices are 'smaller (one size smaller) or 'parentheses.")
      (cautionary ,boolean? "is this a cautionary accidentals.?")
-     (cavum ,boolean? "is this neume ,outlined?.")
-
      (concaveness-gap ,ly:dimension? "A beam is
 considered to be concave if the distance of an inner notehead to the
 line between two outer noteheads is bigger than this gap.")
@@ -125,7 +156,6 @@ square of the inner notes involved.")
      (collapse-height ,ly:dimension? "Minimum height of system start delimiter.  If equal or smaller, the bracket is removed.")
 
      ;;DOCME
-     (context-info ,integer? "")
 
      (control-points ,list? "List of 4 offsets (number-pairs) that form control points for the  tie/slur shape.")
 
@@ -139,12 +169,7 @@ line).")
 
      ;; [FIXME: use dash-period/dash length; see text-spanner]
      (dashed ,number? " number representing the length of the dashes.")
-     (descendens ,boolean? "is this neume of a descendent ,type?.")
      
-     (de-uglify-parameters ,list? "list of 3 real constants. They
-define the valid areas for the middle control points. Used in
-de_uglyfy. They are empirical.")
-
      (neutral-direction ,ly:dir? "Where to go if we're on the neutral
 position of the staff (see also grob-property neutral-position).")
 
@@ -157,9 +182,6 @@ Use property neutral-direction to control the behaviour of stems on
 the neutral position itself.  (Note: currently, neutral-position is
 supported only for custodes; for stems of note heads, neutral-position
 is currently fixed to 0, i.e. the middle of the staff.)")
-     
-     (deminutum ,boolean? "is this neume ,deminished?.")
-     (details ,list? "alist of parameters for detailed grob behavior.")
      (dir-function ,procedure? "function of type (count total)->direction.  Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.
 
 The ways to calculate the direction of a beam work as follows:
@@ -173,7 +195,7 @@ mean centre distance weighted per note
 @end table
 
 ")
-     (direction ,ly:dir? "Up or down, left or right?.")
+     (direction ,ly:dir? "Up or down, left or right?")
      (dot-count ,integer? "number of dots.")
      (duration-log ,integer? "2-log of the notehead duration, i.e. 0=whole note, 1 = half note, etc.")
      (edge-height ,pair? "a cons that specifies the heights of the vertical edges '(LEFT-height . RIGHT-height).")
@@ -211,10 +233,8 @@ options include undefined and mensural.  Additionally, @code{no-flag}
 switches off the flag.")
      (stroke-style ,string? "set to \"grace\" to turn stroke through flag on.")
      (flag-width-function ,procedure? "Procedure that computes the width of a half-beam (a non-connecting beam.).")
-     (flexa-height ,ly:dimension? "height of a flexa shape in a ligature grob in staff_space.")
-     (flexa-width ,ly:dimension? "width of a flexa shape in a ligature grob in staff_space.")
      (font-family ,symbol? "partial font
-definition: music roman braces dynamic math ...")
+definition: music roman braces dynamic math ..")
      (font-name ,string? "file name for the font to load.
 Overrides all other font-X qualifiers.")
      (font-magnification ,number? "Magnification
@@ -247,8 +267,9 @@ name of character within font.")
 
      (gap ,ly:dimension? "Size of a gap in a variable symbol.")
      (gap-count ,integer? "Number of gapped beams for tremolo.")
+     (grace-space-factor ,number? "space grace at this fraction of the increment.")
 
-     (grow-direction ,ly:dir? "crescendo or ,decrescendo?.")
+     (grow-direction ,ly:dir? "crescendo or decrescendo?")
      (hair-thickness ,number? "thickness, measured in linethickness.")
      (height ,ly:dimension? "in staffspace.")
 
@@ -258,13 +279,10 @@ slur, the closer it is to this height.")
      (horizontal-shift ,integer? "integer that identifies ranking of
 note-column for horizontal shifting. This is used by
 @internalsref{note-collision-interface}.")
-     (ideal-distances ,list? "(OBJ . (DIST . STRENGTH)) pairs.")
-     (inclinatum ,boolean? "is this neume an ,inclinatum?.")
      (interfaces ,list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
-     (join-heads ,boolean? "Whether to join the noteheads of an ambitus grob with a vertical line.")
      (kern ,ly:dimension? "amount of extra white
 space to add. For barline, space after a thick line.")
-     (knee ,boolean? "Is this beam a ,knee?")
+     (knee ,boolean? "Is this beam a knee?")
      (knee-spacing-correction ,number? "optical correction amount for knees. 0: no correction; 1: full correction.")
      (layer ,number? "The output layer [0..2].  The default is 1.")
 
@@ -281,7 +299,6 @@ cdr for staff space. Both contributions are added.")
 multiplicity of flag.  The Nth element of the list gives the stem
 length of a note with N flags.
 ")
-     (linea ,boolean? "attach vertical lines to this ,neume?.")
      (line-count ,integer? "Number of staff
 lines.  If you want to override this for staffs individually, you must
 use @code{\\outputproperty}. @code{\\property .. \\override} will not
@@ -304,61 +321,48 @@ noteheads in collisions, even if they have a different number of
 dots. This normal notation for some types of polyphonic music. The
 value of this setting is used by @internalsref{note-collision-interface} .")
 
-     (meta ,list? "Contains meta information. It is an alist with the
-entries @code{name} and @code{interfaces}.")
-
      (minimum-distance ,ly:dimension? "Minimum distance between rest and notes or beam.")
-     (minimum-distances ,list? "list of rods (ie. (OBJ . DIST) pairs).")
      (minimum-X-extent ,number-pair? "minimum size in X dimension, measured in staff space.")
      (minimum-Y-extent ,number-pair? "see @code{minimum-Y-extent}.")
-     (minimum-length ,ly:dimension? "try to make the
-Grob at least this long.
-
-Also works as a scaling parameter for the length of hyphen. .")
+     (minimum-length ,ly:dimension? "try to make a spanner at least
+this long. This requires a routine setting rods in @code{spacing-procedure} property.")
      (minimum-space ,ly:dimension? "minimum distance that the victim should move (after padding).")
      (print-function ,procedure? "Function taking grob as argument,
 returning a Molecule object.")
 
-     (stencil ,ly:stencil? "Cached output of the print-function.")
-
      (new-accidentals ,list? "list of (pitch, accidental) pairs.")
-     (no-spacing-rods ,boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
-     (no-stem-extend ,boolean? "should stem not be extended to middle staff ,line?.")
-     (non-default ,boolean? "not set because of existence of a ,bar?.")
-     (note-head-style ,string? "name of the font character to be used as note heads in the ambitus grob.")
+     (no-spacing-rods ,boolean? "Items with this property do not cause
+spacing constraints.")
+     (no-stem-extend ,boolean? "prevent stem from extending to middle
+staff line?")
+     (non-default ,boolean? "set for manually specified clefs.")
      (old-accidentals ,list? "list of (pitch, accidental) pairs.")
-     (oriscus ,boolean? "is this neume an ,oriscus?.")
 
      (enclose-bounds ,number?
-                    "How much of the bound a spanner  should enclose: +1 = completely, 0 = center, -1 not at all.")
+                    "How much of the bound a spanner should enclose:
++1 = completely, 0 = center, -1 not at all.")
 
-     (padding ,ly:dimension? "add this much extra space between objects that are next to each other.")
+     (padding ,ly:dimension? "add this much extra space between
+objects that are next to each other.")
      (penalty ,number? "Penalty for breaking at
 this column. 10000 or more means forbid linebreak, -10000 or less
 means force linebreak.  Other values influence linebreaking decisions
 as a real penalty.")
-
-     (pes-or-flexa ,boolean? "shall this neume be joined with the previous ,head?.")
-
      (pitch-max ,ly:pitch? "FIXME, JUNKME")
      (pitch-min ,ly:pitch? "FIXME, JUNKME")
-     
-     (quilisma ,boolean? "is this neume a ,quilisma?.")
      (positions ,pair?
 
                "cons of staff coordinates (@var{left} . @var{right}),
 where both @var{left} and @var{right} are in the staff-space unit of
 the current staff.")
 
-     ;; DOCME
-     (prefix-set ,number? "")
      (ratio ,number? "Parameter for slur shape. The higher this number, the
 quicker the slur attains it @code{height-limit}.")
-     (remove-first ,boolean?
-                  "Remove the first staff of a orchestral score?")
+     (remove-first ,boolean? "Remove the first staff of a orchestral score?")
      (right-padding ,ly:dimension? "space right of accs.")
      (right-position ,number? "position of right part of spanner.")
-     (script-priority ,number? "A sorting key that determines in what order a script is within a stack of scripts.")
+     (script-priority ,number? "A sorting key that determines in what
+order a script is within a stack of scripts.")
 
      ;; TODO: revise typing
      (self-alignment-X ,number-or-grob? "real number: -1 =
@@ -399,7 +403,7 @@ duration. Typically, the width of a note head. See also
 argument. This is called after before-line-breaking-callback, but
 before the actual line breaking itself.  Return value is ignored.")
      
-     (stacking-dir ,ly:dir? "stack contents of grobs in which direction ?.")
+     (stacking-dir ,ly:dir? "stack contents of grobs in which direction ?")
      (staff-space ,ly:dimension? "Amount of line leading relative to global staffspace.")
      (staff-position ,number? "vertical position in staff spaces, counted from the middle line.")
 
@@ -417,8 +421,7 @@ the Nth element of the list gives the amount stem shortening of a note with N fl
 ")
      ;;[TODO: doco]
      (stem-spacing-correction ,number? "optical correction amount.   ")
-     (stropha ,boolean? "is this neume a ,stropha?.")
-     (style ,symbol? "a string determining what style of  glyph is typeset. Valid choices depend on the function that is reading this property. .")
+     (style ,symbol? "a string determining what style of  glyph is typeset. Valid choices depend on the function that is reading this property.")
      (text-repeat-if-broken ,boolean?
                            "Repeat text on broken ,text-spanner?")
      (text ,markup? "Text markup.  See the
@@ -432,7 +435,7 @@ notation manual for more information.")
      (transparent ,boolean? "This is almost the
 same as setting print-function to #f, but this retains the
 dimensions of this grob, which means that you can erase grobs
-individually. .")
+individually.")
      (bracket-visibility ,boolean-or-symbol? " This controls the
 visibility of the tuplet bracket.  Setting it to false will prevent
 printing of the bracket. Setting the property to #'if-no-beam will
@@ -444,15 +447,15 @@ bracket.")
 
      ;; FIXME.
      (break-visibility ,procedure? "a function that takes the break
-direction and returns a cons of booleans containing (TRANSPARENT
-. EMPTY).  The following variables are predefined: @code{all-visible},
-@code{begin-of-line-visible}, @code{end-of-line-visible},
-@code{begin-of-line-invisible}, @code{end-of-line-invisible},
-@code{all-invisible}.
+direction and returns a cons of booleans containing (@var{transparent}
+. @var{empty}).  The following variables are predefined:
+@code{all-visible}, @code{begin-of-line-visible},
+@code{end-of-line-visible}, @code{begin-of-line-invisible},
+@code{end-of-line-invisible}, @code{all-invisible}.
 ")
+     (flag-count ,number? "Number of tremolo beams.")
 
-     (virga ,boolean? "is this neume a ,virga?.")
-     (when ,ly:moment? "when does this column ,happen?.")
+     (when ,ly:moment? "when does this column happen?")
      (word-space ,ly:dimension? "space to insert between lyrics or
 words in texts.")
      (width ,ly:dimension? "width of a grob measured in staff space.")
@@ -499,9 +502,10 @@ duration of a measure is a breve or longer.")
    
    `(
      (accidental-grobs ,list? "Alis with (NOTENAME . GROBLIST) entries")
-     
-     (all-elements ,grob-list? "list of all grobs in this line. Needed for protecting grobs from GC.")
-     (arpeggio ,ly:grob? "pointer to arpeggio object.") 
+     (after-line-breaking-callback ,procedure? "This procedure is called after line breaking. Its return value is ignored.")     
+     (all-elements ,grob-list? "list of all grobs in this line. Its
+function is to protect objects from being garbage collected.")
+     (arpeggio ,ly:grob? "pointer to arpeggio object.")
      (beam ,ly:grob? "pointer to the beam, if applicable.")
      (center-element ,ly:grob? "grob which will be at the center of
 the group after aligning (when using
@@ -520,12 +524,14 @@ set, which grob to get the direction from .")
      (bars ,grob-list? "list of barline pointers.")
      (bounded-by-me ,grob-list? "list of spanners that have this
 column as start/begin point. Only columns that have grobs or act as bounds are spaced.")
-     (columns ,grob-list? "list of grobs, typically containing paper-columns.")
+     (columns ,grob-list? "list of grobs, typically containing
+paper-columns or note-column objects.")
      (conditional-elements ,grob-list? "Internal use only")
      (dependencies ,grob-list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
      (elements ,grob-list? "list of grobs, type depending on the Grob where this is set in.")
      (heads ,grob-list? "List of note heads.")
      (items-worth-living ,grob-list? "list of interesting items. If empty in a particular system, clear that system.")
+     (details ,list? "alist of parameters for detailed grob behavior.")
      (note-heads ,grob-list? "List of note head grobs")
      (side-support-elements ,grob-list? "the support, a list of grobs.")
      (spacing-wishes ,grob-list? "List of note spacing or staff spacing objects.")
@@ -551,8 +557,9 @@ did it's job. This ensures that a positioning is only done once.")
 
      (script-stencil ,pair? "Index code for script -- internal, see script.cc.")
 
+     (meta ,list? "Contains meta information. It is an alist with the
+entries @code{name} and @code{interfaces}.")
 
-     (flag-count ,number? "")
 
      ;; TODO: use interface for this!
      (chord-tremolo ,boolean? "if set, this beam is a tremolo. ")
@@ -567,13 +574,10 @@ debugging")
      (note-columns ,pair? "list of NoteColumn grobs.")
 
      (if-text-padding ,number? "padding in case texts are there.")
-     (grace-space-factor ,number? "space grace at this fraction of the increment.")
      (position-callbacks ,list? "list of
 functions set spanner positions.")
 
 ;;; Junk me, replace it by add-join.
-     (join-left ,boolean? "is this ligature head joined with the previous one by a vertical ,line?")
-
      (join-left-amount ,number? "")
 
      (delta-pitch ,number? "the interval between this and the next note, or, more precisely, their vertical distance; this is used in ligatures for calculation of the height of vertical joins flexa shapes")
@@ -581,6 +585,14 @@ functions set spanner positions.")
 
      ;; [TODO: change this]
      (primitive ,integer? "Pointer to a ligature primitive, i.e. an item similar to a note head that is part of a ligature. ")
+     (stencil ,ly:stencil? "Cached output of the print-function.")
+     (de-uglify-parameters ,list? "list of 3 real constants. They
+define the valid areas for the middle control points.  They are
+empirical.")
+     (ideal-distances ,list? "(@var{obj} . (@var{dist} . @var{strength})) pairs.")
+     (minimum-distances ,list? "list of rods, that have the format (@var{obj} . @var{dist}).")
+
+
      
      )))
 
index 4cd43d3de91959af3b037a8378d3d26f88dc94ad..21b612e9ed6386d180beca746fdc482b8b55553d 100644 (file)
@@ -40,7 +40,7 @@
        (print-function . ,Ambitus::print)
        (font-family . music)
        (note-head-style . "noteheads-2")
-       (visibility-lambda . ,begin-of-line-visible)
+       (break-visibility . ,begin-of-line-visible)
        (join-heads . #t)
        (space-alist . (
                       (clef . (extra-space . 0.0))
        ;; sadly possibly breaking patterns with high order beams.
        (beamed-stem-shorten . (1.0 0.5 0.25))
        
-       (outer-stem-length-limit . 0.2)
        (slope-limit . 0.2)
        (flag-width-function . ,beam-flag-width-function)
        (damping . 1)
        (spacing-procedure . ,Spanner::set_spacing_rods)
        (minimum-length . 2.0)
        (if-text-padding . 1.0)
-       (dash-length . 4.0)
        (self-alignment-Y . 0)
        (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
        (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
  (NoteCollision
      . (
        (axes . (0 1))
-       ;; Ugh, should not be hard-coded. 
-       (note-width . 1.321)
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
        (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
        (print-function . ,Multi_measure_rest::percent)
        (slope . 1.0)
        (thickness . 0.48)
-       (minimum-width . 12.5) ; staffspace
        (font-family . music)
        (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
        ))
        (arch-angle . 50.0)
        (arch-thick . 0.25)
        (arch-width . 1.5)
-       (bracket-collapse-height . 1)
+       (collapse-height . 1)
        (thickness . 0.25)
        (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
        ))
index 7e6ca259a53f5fe0369df77e41423a30edf516a6..11411f4f12b1d45aa663a871204c8c884b163014 100644 (file)
@@ -145,9 +145,9 @@ overriding Staff.defaultBarType will have no effect.
 decrescendi.  One of: @samp{hairpin}, @samp{line}, @samp{dashed-line},
 @samp{dotted-line}.  If unset, hairpin type is used.")
 
-     (explicitClefVisibility ,procedure? "visibility-lambda function for clef changes.")
+     (explicitClefVisibility ,procedure? "break-visibility function for clef changes.")
 
-     (explicitKeySignatureVisibility ,procedure? "visibility-lambda
+     (explicitKeySignatureVisibility ,procedure? "break-visibility
 function for explicit Key changes; \\override of #'break-visibility
 will set the visibility for normal (ie. at the start of the line) key
 signatures.")
index 35fdfcd2cb4e448f4e2671f8c288a192f0a1f63a..484c65eaceccb4b83b5806f17bc3459a80449daf 100644 (file)
@@ -34,13 +34,21 @@ Interfaces:
        (desc (cadr interface))
        (props (sort (caddr interface) symbol<?))
        (docfunc (lambda (pr)
-                 (document-property
-                  pr 'backend grob-description)))
-       (propdocs (map docfunc props)))
-    (string-append
-     desc
-     "\n\n"
-     (description-list->texi propdocs))
+                 (property->texi
+                   'backend pr grob-description)))
+       (iprops (filter (lambda (x) (object-property x 'backend-internal) ) props))
+       (uprops (filter (lambda (x) (not (object-property x 'backend-internal)) ) props))
+       (user-propdocs (map docfunc uprops))
+       (internal-propdocs (map docfunc iprops)))
+
+       (string-append
+       desc
+       "\n\n@unnumberedsubsubsec User settable properties:\n"
+       (description-list->texi user-propdocs)
+
+       "\n\n@unnumberedsubsubsec Internal properties: \n"
+       (description-list->texi internal-propdocs)
+       )
     ))
 
 
@@ -71,7 +79,7 @@ Interfaces:
     (make <texi-node>
       #:name name
       #:text (string-append
-             (interface-doc-string (cdr interface) #f)
+             (interface-doc-string (cdr interface) '())
              "\n\n"
              "This grob interface is used in the following graphical objects: "
 
@@ -82,6 +90,17 @@ Interfaces:
 
       )))
 
+(define (grob-alist->texi alist)
+  (let*
+      ((uprops (filter (lambda (x) (not (object-property x 'backend-internal)))
+                      (map car alist))))
+
+    (description-list->texi
+     (map (lambda (y) (property->texi 'backend y alist))
+         uprops)
+     )))
+
+
 (define (grob-doc description)
   "Given a property alist DESCRIPTION, make a documentation
 node."
@@ -89,18 +108,12 @@ node."
   (let*
       (
        (metah (assoc 'meta description))
-       
        (meta (cdr metah))
        (name (cdr (assoc 'name meta)))
        (ifaces (map lookup-interface (cdr (assoc 'interfaces meta))))
        (ifacedoc (map (lambda (iface)
-                       (string-append
-"
-@subsubheading "
-(ref-ify (symbol->string (car iface)))
-
-"\n\n"
-                       (interface-doc-string iface description)))
+                       (ref-ify (symbol->string (car iface)))
+                       )
                      (reverse ifaces)))
        (engravers (filter
                   (lambda (x) (engraver-makes-grob? name x)) all-engravers-list))
@@ -115,7 +128,10 @@ node."
        namestr " grobs are created by: "
        (human-listify (map ref-ify
                           (map engraver-name engraver-names)))
-       (apply string-append ifacedoc)
+       "\n\nStandard settings: \n\n"
+       (grob-alist->texi description)
+       "\n\nThis object supports the following interfaces: \n"
+       (human-listify ifacedoc)
        ))
     ))
 
@@ -153,7 +169,7 @@ node."
 
 (define (lookup-interface name)
   (let*  (
-         (entry  (hashq-ref (ly:all-grob-interfaces) name #f))
+         (entry  (hashq-ref (ly:all-grob-interfaces) name '() ))
          )
 
     (if (equal? entry #f)
@@ -175,7 +191,7 @@ node."
       (
        (ps (sort (map symbol->string lst) string<?))
        (descs (map (lambda (prop)
-                    (document-property (string->symbol prop) 'backend #f))
+                    (property->texi 'backend (string->symbol prop)  '()))
                   ps))
        (texi (description-list->texi descs))
        )
index 97991c8971f1419d58d58dc4fb1588a2ea29a522..c0d8157c78ca81b5f3561ba60fa38861fb397805 100644 (file)
@@ -90,7 +90,7 @@
      "\n\nProperties: \n"
      (description-list->texi
       (map
-       (lambda (x) (document-property x 'music props))
+       (lambda (x) (property->texi 'music  x props))
        (map car props)))
      
      )
index e7e8cdd5d375b18fe3513e2caaa2b558ecde5f49..b7bf4b09db3900439605e9b3e786d9c21c26cc3d 100644 (file)
@@ -1,4 +1,3 @@
-
 ;;; engraver-doumentation-lib.scm -- Functions for engraver documentation
 ;;;
 ;;; source file of the GNU LilyPond music typesetter
@@ -30,7 +29,7 @@
         (propsw (cdr (assoc 'properties-written (ly:translator-description engraver))))
         (accepted  (cdr (assoc 'events-accepted (ly:translator-description engraver)))) 
         (name-sym  (ly:translator-name engraver))
-        (name (symbol->string name-sym))
+        (name-str (symbol->string name-sym))
         (desc (cdr (assoc 'description (ly:translator-description engraver))))
         (grobs (engraver-grobs engraver))
         )
@@ -54,7 +53,7 @@
         (string-append
          "Properties (read)"
          (description-list->texi
-          (map (lambda (x) (document-property x 'translation #f)) propsr)))
+          (map (lambda (x) (property->texi 'translation  x '())) propsr)))
         "")
      
      (if (null? propsw)
         (string-append
         "Properties (write)" 
          (description-list->texi
-          (map (lambda (x) (document-property x 'translation #f)) propsw))))
+          (map (lambda (x) (property->texi 'translation  x '())) propsw))))
      (if  (null? grobs)
          ""
          (string-append
           "This engraver creates the following grobs: \n "
-          (human-listify (map ref-ify (uniq-list (sort  grobs string<? ))))
+          (human-listify (map ref-ify (uniq-list (sort grobs string<? ))))
           ".")
          )
 
      "\n\n"
 
      (if in-which-contexts
-        (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 'context-name x)))
-                                    (consists (append
-                                               (list (cdr (assoc 'group-type x)))
-                                               (cdr (assoc 'consists x))
-                                               )))
-
-                                (if (member name consists)
-                                    (list context)
-                                    '())))
-                            context-description-alist))))
+        (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 'context-name x)))
+                             (consists (append
+                                        (list
+                                         (cdr (assoc 'group-type x)))
+                                        (cdr (assoc 'consists x))
+                                        ))
+
+
+                             )
+                          (if (member name-sym consists)
+                              (list context)
+                              '())))
+                      context-description-alist))))
           (string-append
-           name " is part of contexts: "
+           name-str " is part of contexts: "
            (human-listify (map ref-ify (map symbol->string contexts)))))
         ""
         ))))
        (sortedsyms (map string->symbol ps))
        (propdescs
        (map
-        (lambda (x) (document-property x 'translation #f))
+        (lambda (x) (property->texi 'translation  x '()))
         sortedsyms))
        (texi (description-list->texi propdescs)))
     texi
index 8dc5edc5cabf2bb6836c7a298fd2fa3ae75ce69c..e0b056205aac08fa63a3a963d26ad4e047c7b3b9 100644 (file)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; property  stuff.
 
-(define (property->texi where sym)
-  "Document SYM for WHERE (which can be translation, backend, music)"
+(define (property->texi where sym . rest)
+  "Document SYM for WHERE (which can be translation, backend, music),
+with init values from ALIST (1st optional argument)
+"
   (let* ((name (symbol->string sym))
+        (alist (if (pair? rest) (car rest) '()))
         (type?-name (string->symbol
                      (string-append (symbol->string where) "-type?")))
         (doc-name (string->symbol                  
                    (string-append (symbol->string where) "-doc")))
         (type (object-property sym type?-name))
         (typename (type-name type))
-        (desc (object-property sym doc-name)))
+        (desc (object-property sym doc-name))
+        (handle (assoc sym alist))
+        )
 
     (if (eq? desc #f)
        (error "No description for property ~S" sym))
        
     (cons
      (string-append "@code{" name "} "
-                   "(" typename ")")
+                   "(" typename ")"
+                   (if handle
+                       (string-append
+                        ":\n\n @code{"
+                        (scm->texi (cdr handle))
+                        "}\n\n")
+                       "")
+                                   
+
+                   )
      desc)
      
     ))
 
-(define (document-property-value sym alist)
-  "Extract value for SYM from ALIST, return as texi string"
-  (let* ((handle (assoc sym alist)))
-    (if (eq? handle #f)
-       "(unset)"
-       (scm->texi (cdr handle)))))
-
-(define (backend-property->texi sym)
-  (property->texi 'backend sym))
-
-(define (document-property sym where alist)
-  "Document SYM. If GROB-DESCRIPTION is not #f, it's an alist
-containing default values."
-  (let*
-      ((without (property->texi where sym))
-       (rv
-
-       (cons (car without)
-             (if (eq? alist #f)
-                 (cdr without)
-                 (string-append
-                  (cdr without)
-                  "\nDefault value: "
-                  (document-property-value sym alist))))))
-    rv))
index bd268611b329f2a3164af726b3f4452dcacde656..4b218337620ec145fc89e158e6666324d69545fc 100644 (file)
@@ -456,6 +456,7 @@ L1 is copied, L2 not.
    (,ly:music? . "music")
    (,ly:pitch? . "pitch")
    (,ly:translator? . "translator")
+   (,ly:font-metric? . "font metric")
    (,markup-list? . "list of markups")
    (,markup? . "markup")
    (,music-list? . "list of music")