From: Han-Wen Nienhuys Date: Sun, 28 Mar 2004 19:55:48 +0000 (+0000) Subject: * Documentation/user/changing-defaults.itely (Determining the grob X-Git-Tag: release/2.1.37~31 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2f47e632d869f7adfffa656b79a6f76cfa31a11e;p=lilypond.git * Documentation/user/changing-defaults.itely (Determining the grob property): fix references. * lily/staff-symbol.cc (print): only add extent if non empty. This fixes staff-container.ly. * lily/timing-engraver.cc (initialize): init whichBar, so a score starting with a mmrest also works. --- diff --git a/ChangeLog b/ChangeLog index 7dcd7b9fba..40637530c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2004-03-28 Han-Wen Nienhuys + * Documentation/user/changing-defaults.itely (Determining the grob + property): fix references. + + * lily/staff-symbol.cc (print): only add extent if non empty. + This fixes staff-container.ly. + + * lily/timing-engraver.cc (initialize): init whichBar, so a score + starting with a mmrest also works. + * scripts/lilypond-book.py (Lilypond_snippet.is_outdated): require PNG for texinfo too. diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index 1e3a0575c2..9653f281a9 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -139,7 +139,7 @@ be used for another calculation. @result{} #13 @end lisp -These calculations are examples of evaluations: an expression (like +These calculations are examples of evaluations: an expression like @code{(* 3 4)} is replaced by its value @code{12}. A similar thing happens with variables. After defining a variable @@ -213,8 +213,10 @@ a quote. For example, We have been using lists all along. A calculation, like @code{(+ 1 2)} is also a list (containing the symbol @code{+} and the numbers 1 -and 2). For entering lists, use a quote @code{'} and for -calculations, do not use a quote. +and 2). Normally lists are interpreted as calculations, and the Scheme +interpreter substitutes the outcome of the calculation. To enter a +list, we stop evaluation. This is done by quoting the list with a +quote @code{'} symbol. For calculations, do not use a quote. Inside a quoted list or pair, there is no need to quote anymore. The following is a pair of symbols, a list of symbols and a list of lists @@ -262,7 +264,7 @@ reference, see Translation @arrow{} Context. @end ifnothtml -[TODO: describe propagation] +@c [TODO: describe propagation] @menu @@ -530,9 +532,10 @@ example which removes @code{Time_signature_engraver} and @end lilypond In the second stave there are no time signature or clef symbols. This -is a rather crude method of making objects disappear, it will affect the -entire staff. The spacing will be adversely influenced too. More -sophisticated methods of blanking objects are shown in (TODO). +is a rather crude method of making objects disappear, it will affect +the entire staff. The spacing will be adversely influenced too. A more +sophisticated methods of blanking objects is shown in @ref{Common +tweaks}. The next example shows a practical application. Bar lines and time signatures are normally synchronized across the score. This is done @@ -581,9 +584,9 @@ The syntax for this is Here @var{name} is the name of a graphical object, like @code{Stem} or @code{NoteHead}. @var{property} is an internal variable of the formatting system (`grob property' or `layout property'). It is a -symbol, so it must be quoted. The subsection refTODO explains what to -fill in for @var{name}, @var{property} and @var{value}. Here we only -discuss functionality of this command. +symbol, so it must be quoted. The subsection @ref{Constructing a +tweak} explains what to fill in for @var{name}, @var{property} and +@var{value}. Here we only discuss functionality of this command. The command @@ -1092,9 +1095,6 @@ If you have them, use the local HTML files. They will load faster, and they are exactly matched to LilyPond version installed. - -@c [TODO: revise for new site.] - @node Navigating the program reference @subsection Navigating the program reference diff --git a/input/test/gregorian-scripts.ly b/input/test/gregorian-scripts.ly index 9e4b8d8c26..05b7b238ae 100644 --- a/input/test/gregorian-scripts.ly +++ b/input/test/gregorian-scripts.ly @@ -7,6 +7,10 @@ Here is demonstrated a preliminary support of Gregorian Scripts: ictus, circulus, semicirculus, accentus, episem. +"} + +%{ + TODO: augmentum. Syntax: either as bracket (\augmentumInitium, \augmentumFinis), or as head prefix with subsequently collecting all dots and putting them behind the ligature in a vertical row. @@ -19,7 +23,7 @@ FIXME: padding/minimum-distance is fragile. FIXME: episem stops one notehead too early. -"} +%} \include "gregorian-init.ly" diff --git a/input/test/script-priority.ly b/input/test/script-priority.ly index d7085c49f4..917ce847ff 100644 --- a/input/test/script-priority.ly +++ b/input/test/script-priority.ly @@ -3,7 +3,12 @@ \header { texidoc = "@cindex Script Priority Relative placements of different script types can be controlled -by overriding @code{script-priority}. " +by overriding @code{script-priority}. + +In this example, accidentals are put either below or above other +script symbols. + +" } @@ -11,13 +16,13 @@ by overriding @code{script-priority}. " \context Staff \notes \relative g''{ \override Score.TextScript #'script-priority = #-100 - a4^\prall^\markup \fontsize #-2 \semisharp + a4^\prall^\markup { \sharp } \override Score.Script #'script-priority = #-100 \revert Score.TextScript #'script-priority - a4^\prall^\markup \fontsize #-2 \semisharp + a4^\prall^\markup { \sharp } } \paper { raggedright = ##t} } diff --git a/input/test/slur-dash.ly b/input/test/slur-dash.ly index c428b7ba58..208fb09731 100644 --- a/input/test/slur-dash.ly +++ b/input/test/slur-dash.ly @@ -4,7 +4,7 @@ The appearance of slurs may be changed from solid to dotted or dashed. " } \score{ - \notes{ + \notes\relative c'{ c( d e c) | \slurDotted c( d e c) | @@ -16,10 +16,6 @@ The appearance of slurs may be changed from solid to dotted or dashed. c( d e c) | } \paper{ raggedright=##t } -% indent = 0.0\pt - %for broken! - % linewidth= 30.\mm -% } } diff --git a/input/test/slur-manual.ly b/input/test/slur-manual.ly index 9576ad0f96..cf84ae8278 100644 --- a/input/test/slur-manual.ly +++ b/input/test/slur-manual.ly @@ -10,23 +10,34 @@ } -%% This slur does not look good. Looks like there have not been a line -%% break at some point, it is then added, but the slur does not break -%% in the case of a line break. -HJJ +\score { + \notes \new PianoStaff + << + \context Staff = up { + \clef bass + s1 * 4 + } + \context Staff = down \relative c << + s1*4 + { + \clef bass + r4 r8 + \once\override Slur #'extra-offset = #'(0 . -8) + \once\override Slur #'control-points = + #'((0 . -4) (2 . 0) (60 . 0) (63 . 4)) + c8( as' f c' as + + % line breaks will mess up this example + \noBreak + f c as' f + \change Staff = up + \clef treble + c' as f' c + \noBreak + as' f c' as + f' c as' f c'4) + }>> + >> + \paper { raggedright = ##t } +} -\score {\notes \new PianoStaff << - \context Staff = up { \clef bass s1 * 6 } - \context Staff = down \relative c { - \clef bass - r4 r8 - \once\override Slur #'extra-offset = #'(0 . -8) - \once\override Slur #'control-points = - #'((0 . -4) (2 . 0) (60 . 0) (63 . 4)) - c8( as' f c' as f c as' f - \change Staff = up - \clef treble - c' as f' c as' f c' as - f' c as' f c'4) - }>> -\paper { raggedright = ##t } - } diff --git a/input/test/staff-container.ly b/input/test/staff-container.ly index 30775bf0f7..694858a47e 100644 --- a/input/test/staff-container.ly +++ b/input/test/staff-container.ly @@ -20,7 +20,7 @@ what you would expect.) \score { - \notes \relative c'' << + \notes \relative c'' << \new StaffContainer { %% need << >>, otherwise we descend to the voice inside SA @@ -34,33 +34,33 @@ what you would expect.) << \context Staff { e d f \bar ":|" } >> \skip 4 } - >> + >> -\paper { + \paper { \context { - \ScoreContext - \accepts StaffContainer - \denies Staff + \ScoreContext + \accepts StaffContainer + \denies Staff } \context { - \type Engraver_group_engraver - \consists Clef_engraver - \consists Time_signature_engraver - \consists Separating_line_group_engraver - \consistsend "Axis_group_engraver" - \accepts "Staff" - - \name StaffContainer + \type Engraver_group_engraver + \consists Clef_engraver + \consists Time_signature_engraver + \consists Separating_line_group_engraver + \consistsend "Axis_group_engraver" + \accepts "Staff" + + \name StaffContainer } \context { - \StaffContext - \remove Axis_group_engraver - \remove Separating_line_group_engraver - \remove Clef_engraver - \remove Time_signature_engraver + \StaffContext + \remove Axis_group_engraver + \remove Separating_line_group_engraver + \remove Clef_engraver + \remove Time_signature_engraver } raggedright=##t -} + } } diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index a3b02ef731..616cf613e9 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -55,10 +55,10 @@ Staff_symbol::print (SCM smob) { Item * x = sp->get_bound (d); - if (x->break_status_dir ()) - span_points[d] = x->relative_coordinate (common , X_AXIS); - else - span_points[d] = x->extent (common, X_AXIS)[d]; + span_points[d] = x->relative_coordinate (common , X_AXIS); + if (!x->break_status_dir () + && !x->extent (x, X_AXIS).is_empty ()) + span_points[d] += x->extent (x, X_AXIS)[d]; } } while (flip (&d) !=LEFT); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 2bf0e5f652..78b56d44a9 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -22,6 +22,7 @@ protected: Moment last_moment_; virtual void start_translation_timestep (); + virtual void initialize (); virtual void stop_translation_timestep (); public: @@ -35,6 +36,22 @@ Timing_engraver::Timing_engraver () } +void +Timing_engraver::initialize () +{ + Timing_translator::initialize (); + + SCM which = get_property ("whichBar"); + Moment now = now_mom (); + + /* Set the first bar of the score? */ + if (!gh_string_p (which)) + which = (now.main_part_ || now.main_part_ == last_moment_.main_part_) + ? SCM_EOL : scm_makfrom0str ("|"); + + daddy_context_->set_property ("whichBar", which); +} + void Timing_engraver::start_translation_timestep () @@ -47,9 +64,7 @@ Timing_engraver::start_translation_timestep () /* Set the first bar of the score? */ if (!gh_string_p (which)) - which - = (now.main_part_ || now.main_part_ == last_moment_.main_part_) - ? SCM_EOL : scm_makfrom0str ("|"); + which = SCM_EOL; Moment mp = measure_position (); bool start_of_measure = (last_moment_.main_part_ != now.main_part_