2004-01-09 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * stepmake/bin/add-html-footer.py (built): add Wiki links to
+ footer.
+
+ * lily/parser.yy (translator_mod): allow \with { \remove .. }
+
+ * lily/bar-check-iterator.cc (process): only warn if
+ barCheckLastFail was changed.
+
+ * scm/define-translator-properties.scm (barCheckLastFail): add
+ property.
+
* lily/main.cc (main_prog): print summary of failed files.
* lily/axis-group-engraver.cc: move all spanner creation to
process_music (). Now staffs can be adjusted with \override too.
+ (Jan, you are a brilliant programmer!)
* lily/chord-tremolo-engraver.cc (try_music): fix spurious warning.
Unreleased:
@itemize
+@end itemize
+
+Version 2.1.7
+
+@itemize @bullet
+
+@item Contexts may now be changed locally for an isolated music
+expression. For example,
+
+@example
+ \new Voice \with @{
+ \consists "Pitch_squash_engraver"
+ @} @{
+ c'4
+ @}
+@end example
@item The syntax for changing staffs has changed. The keyword
@code{\change} should now be used, e.g.
\change Staff = up
@end example
-@item Features of spanner contexts, like @code{Staff}, can now be changed easily:
+@item Features of spanner contexts, like @code{Staff}, can now be changed
+ using @code{\property}, eg.
@example
- \new Staff \with @{
- StaffSymbol \set #'line-count = #4
- @} @{
- c'4
- @}
+ \new Staff @{
+ \property Staff.StaffSymbol \set #'line-count = #4
+ c'4
+ @}
@end example
@noindent
puts a quarter note C on a staff with 4 lines.
-@end itemize
-
-Version 2.1.7
-
-@itemize @bullet
@item Multi measure rests are now truly centered between the
clefs/barlines of the staff, their position is independent of symbols
* Context properties::
* Context evaluation::
* Defining contexts::
+* Changing contexts locally::
* Engravers and performers::
* Defining new contexts::
@end menu
variable, and apply to one @code{\translator} definition by
referencing that variable.
+@node Changing contexts locally
+@subsection Changing contexts locally
+
+
+Extending an existing context can also be done locally. A piece of
+music can be interpreted in a changed context by using the following syntax
+
+@example
+ \with @{
+ @var{context modifications}
+ @}
+@end example
+
+These statements comes between @code{\new} or @code{\context} and the
+music to be interpreted. The @var{context modifications} property
+settings and @code{\remove}, @code{\consists} and @code{\consistsend}
+commands. The syntax is similar to the @code{\translator} block.
+
+The following example shows how a staff is created with bigger spaces:
+
+@lilypond[relative=1,fragment]
+<<
+ \new Staff { c4 es4 g2 }
+ \new Staff \with {
+ StaffSymbol \set #'staff-space = #(magstep 1.5)
+ fontSize = #1.5
+ \remove "Clef_engraver"
+ } {
+ c4 es4 g2
+ } >>
+@end lilypond
+
+@refbugs
+
+@code{\with} has no effect on contexts that already exist. Neither can
+it be used for @internalsref{Score} contexts.
+
+
@node Engravers and performers
@subsection Engravers and performers
* Ancient notation::
* Contemporary notation::
* Tuning output::
-* Tuning spanning contexts::
* Global layout::
* Sound::
@end menu
@cindex thickness of staff lines, setting
@cindex number of staff lines, setting
-This object is created whenever a @internalsref{Staff} context is
-created. To change its appearance, use the @code{\with} command,
-described in @ref{Tuning spanning contexts}.
-
@seealso
+Internals: @internalsref{StaffSymbol},
-@internalsref{StaffSymbol}, @inputfileref{input/test,staff-lines.ly},
-@inputfileref{input/test,staff-size.ly}, @ref{Tuning spanning contexts}.
+Examples: @inputfileref{input/test,staff-lines.ly},
+@inputfileref{input/test,staff-size.ly}
@refbugs
@internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
@internalsref{SystemStartBracket}. Only one of these types is created
in every context, and that type is determined by the property
-@code{systemStartDelimiter}. They are spanner objects and therefore
-the objects, as well as @code{systemStartDelimiter} must be set from a
-@code{\translator} block (see @ref{Defining contexts}) or using
-@code{\with} (see @code{Tuning spanning contexts}).
-
+@code{systemStartDelimiter}.
@node Polyphony
@section Polyphony
@cindex Non-guitar tablatures
You can change the number of strings, by setting the number of lines
-in the @internalsref{TabStaff}. For more information, see @ref{Tuning
-spanning contexts}).
+in the @internalsref{TabStaff}.
You can change the tuning of the strings. A string tuning is given as
a Scheme list with one integer number for each string, the number
@lilypond[fragment,verbatim]
\context TabStaff <<
-
- \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface)
- 'line-count 4)
\property TabStaff.stringTunings = #'(-5 -10 -15 -20)
\notes {
Editio Vaticana style do clef @tab
@code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
@lilypond[relative 0, notime]
-\context Staff
-\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \set #'line-count = #4
\property Staff.TimeSignature \set #'transparent = ##t
\clef "vaticana_do2" c
@end lilypond
Editio Vaticana style fa clef @tab
@code{vaticana_fa1}, @code{vaticana_fa2} @tab
@lilypond[relative 0, notime]
-\context Staff
-\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \set #'line-count = #4
\property Staff.TimeSignature \set #'transparent = ##t
\clef "vaticana_fa2" c
@end lilypond
Editio Medicaea style do clef @tab
@code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
@lilypond[relative 0, notime]
-\context Staff
-\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \set #'line-count = #4
\property Staff.TimeSignature \set #'transparent = ##t
\clef "medicaea_do2" c
@end lilypond
Editio Medicaea style fa clef @tab
@code{medicaea_fa1}, @code{medicaea_fa2} @tab
@lilypond[relative 0, notime]
-\context Staff
-\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \set #'line-count = #4
\property Staff.TimeSignature \set #'transparent = ##t
\clef "medicaea_fa2" c
@end lilypond
historic style hufnagel do clef @tab
@code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
@lilypond[relative 0, notime]
-\context Staff
-\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \set #'line-count = #4
\property Staff.TimeSignature \set #'transparent = ##t
\clef "hufnagel_do2" c
@end lilypond
historic style hufnagel fa clef @tab
@code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
@lilypond[relative 0, notime]
-\context Staff
-\applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \set #'line-count = #4
\property Staff.TimeSignature \set #'transparent = ##t
\clef "hufnagel_fa2" c
@end lilypond
@menu
* Tuning objects::
+* Constructing a tweak::
+* Applyoutput::
+* Font selection::
+* Text markup::
@end menu
direction.
-@node Tuning spanning contexts
-@section Tuning spanning contexts
-
-Certain objects, for example, the staff symbol, are constructed before
-any @code{\property} statements are executed. Therefore, they must be
-tuned with a different mechanism. This mechanism is @code{\with}. The
-syntax is as follows
-
-@example
- \with @{
- @var{property-settings}
- @}
-@end example
-
-These statements comes between @code{\new} or @code{\context} and the
-music to be interpreted. @var{property-settings} may be any type of
-@code{\property} command. The following example shows how a staff is
-created with bigger spaces:
-
-@lilypond[relative=1,fragment]
-<< \new Staff { c4 es4 g2 }
- \new Staff \with {
- StaffSymbol \set #'staff-space = #(magstep 1.5)
- fontSize = #1.5
- } {
- c4 es4 g2
- } >>
-@end lilypond
-
-@refbugs
-
-@code{\with} has no effect for already existing contexts. @code{\with}
-can not be used for @internalsref{Score} contexts.
-
@menu
* Constructing a tweak::
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=1
-PATCH_LEVEL=7
-MY_PATCH_LEVEL=hwn1
+PATCH_LEVEL=8
+MY_PATCH_LEVEL=
\property Score.timing = ##f
% \property Score.forceAccidental = ##t %%%%%%%% FIXME: what happened to this property?
- % this is broken until further notice -- see refman
- % \property Staff.StaffSymbol \override #'line-count = #4
- \context Staff \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 4)
+ \property Staff.StaffSymbol \override #'line-count = #4
\notes \transpose c c {
\property Staff.KeySignature \override #'style = #'vaticana
\new Staff <<
\upper
>>
- \new Staff \with { StaffSymbol \set #'line-count = #4 } <<
- \clef bass
- \lower
+ \new Staff {
+ \property Staff.StaffSymbol \set #'line-count = #4 } <<
+ \clef bass
+ \lower
>>
>>
\paper { raggedright=##t}
\header { texidoc = "@cindex Staff Size
-For setting staff sizes there are two options: using
-@code{StaffContainer} and override/revert, or
-@code{\with}. Both methods are shown in this example."
+For setting staff sizes, both @code{staff-space} and @code{fontSize}
+must be set."
}
\score {
\notes \relative c' <<
- \new StaffContainer {
- \property StaffContainer.StaffSymbol \set #'staff-space = #(magstep -2)
- \property Staff.fontSize = #-2
-
- \dynamicUp\stemDown
-
- %\key gis \major
- c8 d e[ f g a] b c \ff
- }
-
\new Staff \relative c'' {
\dynamicDown c,,4 \ff c c c
}
return new Spanner (get_property ("VerticalAxisGroup"));
}
+/*
+ TODO: should we junk minimumVerticalExtent/extraVerticalExtent ?
+ */
+
void
Axis_group_engraver::finalize ()
{
if (where->main_part_)
{
- get_music ()->origin ()->warning (_f ("barcheck failed at: %s",
- where->to_string ()));
+ bool warn =true;
if (to_boolean (sync))
{
tr = tr->where_defined (ly_symbol2scm("measurePosition"));
Moment zero;
tr->set_property ("measurePosition", zero.smobbed_copy ());
}
+ else
+ {
+ SCM lf = tr->get_property ("barCheckLastFail");
+ if (unsmob_moment (lf)
+ && *unsmob_moment (lf) == *where)
+ warn = false;
+ else
+ tr->set_property ("barCheckLastFail", mp);
+ }
+
+ if (warn)
+ get_music ()->origin ()->warning (_f ("barcheck failed at: %s",
+ where->to_string ()));
}
}
}
Grob *g = announce_infos_[i].grob_;
if (!dynamic_cast<Paper_column*> (g)) // ugh.
{
-
String msg= "Grob "
+ g->name()
+ " was created too late!";
trans_group_list_ = add_translator (trans_group_list_,t);
Translator_def * td = unsmob_translator_def (tg->definition_);
+
+ /*
+ this can not move before add_translator(), because \override
+ operations require that we are in the hierarchy.
+ */
td->apply_default_property_operations (tg);
t->initialize ();
(translator-property-description 'barAlways boolean? "If set to true a bar line is drawn after each note.
")
+(translator-property-description 'barCheckLastFail ly:moment? "Where in the measurze did the last barcheck fail?")
+
(translator-property-description 'barCheckSynchronize boolean? "If
true then reset measurePosition when finding a barcheck. Turn off when
using barchecks in polyphonic music.")
default_header = r"""
"""
+
+wiki_base = 'http://afavant.elte.hu/lywiki/'
+
+
default_footer = r"""<hr>Please take me <a href=@INDEX@>back to the index</a>
of @PACKAGE_NAME@
"""
-built = r"""<hr>
-<p><font size="-1">
-This page is for @PACKAGE_NAME@-@PACKAGE_VERSION@ (@BRANCH@). <br>
+built = r"""
+<p>
+<table align="center" width="100%%" cellspacing="2" BGCOLOR="#e8ffe8">
+ <tr>
+ <td align=left>
+
+<a href="%(wiki_base)s%(wiki_page)s">Read </a> comments on this page, or
+<a href="%(wiki_base)s%(wiki_page)s?action=edit">add</a> one.
+<p>
+<font size="-1">
+This page is for %(package_name)s-%(package_version)s (%(branch_str)s). <br>
</font>
<address><font size="-1">
-Report errors to <<a href="mailto:@MAILADDRESS@">@MAILADDRESS@</a>>.</font></address>"""
+Report errors to <<a href="mailto:%(mail_address)s">%(mail_address)s</a>>.</font></address>
+ </tr>
+ </table>
+
+
+"""
def gulp_file (f):
def do_file (f):
s = gulp_file (f)
+ s = re.sub ('%', '%%', s)
if changelog_file:
changes = gulp_file (changelog_file)
branch_str = 'stable-branch'
if string.atoi ( versiontup[1]) % 2:
branch_str = 'development-branch'
-
- s = re.sub ('@INDEX@', index, s)
- s = re.sub ('@TOP@', top, s)
- s = re.sub ('@PACKAGE_NAME@', package_name, s)
- s = re.sub ('@PACKAGE_VERSION@', package_version, s)
- s = re.sub ('@WEBMASTER@', webmaster, s)
- s = re.sub ('@GCOS@', gcos, s)
- s = re.sub ('@LOCALTIME@', localtime, s)
- s = re.sub ('@MAILADDRESS@', mail_address, s)
- s = re.sub ('@BRANCH@', branch_str, s)
- # ugh, python2.[12] re is broken.
- #pat = re.compile ('.*?<!--\s*(@[^@]*@)\s*=\s*([^>]*)\s*-->', re.DOTALL)
- pat = re.compile ('[.\n]*?<!--\s*(@[^@]*@)\s*=\s*([^>]*)\s*-->')
- m = pat.search (s)
- while m:
- at_var = m.group (1)
- at_val = m.group (2)
- sys.stderr.write ('at: %s -> %s\n' % (at_var, at_val))
- s = re.sub (at_var, at_val, s)
- m = pat.search (s)
+ wiki_page = ('v%s.%s-' % (versiontup[0], versiontup[1]) + f)
+ wiki_page = re.sub ('out-www/', '', wiki_page)
+ wiki_page = re.sub ('/', '-', wiki_page)
+ wiki_page = re.sub ('.html', '', wiki_page)
+ subst = globals ()
+ subst.update (locals())
+
+
+ s = s % subst
+
# urg
# maybe find first node?
fallback_web_title = '-- --'