From 35f48f6592df5dabe2b2c4633953eb1547fc6607 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 16 Jun 2002 22:22:04 +0000 Subject: [PATCH] '' --- autogen.sh | 1 - lily/paper-column.cc | 1 + lily/simple-spacer.cc | 13 ++++--------- lily/spacing-spanner.cc | 31 ++++++++++++++++++++++++++----- make/ly-rules.make | 6 ++++-- scm/basic-properties.scm | 4 +++- scripts/lilypond-book.py | 2 +- 7 files changed, 39 insertions(+), 19 deletions(-) diff --git a/autogen.sh b/autogen.sh index 20119e8831..c9128e998d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,7 +13,6 @@ srcdir=`dirname $0` # advertises itself as autoconf 2.13. # If you have such a setup, invoke this script as: # autoconf=autoconf ./autogen.sh -set -x for i in in autoconf autoconf2.50 false; do version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'` if test "0$version" -ge 250; then diff --git a/lily/paper-column.cc b/lily/paper-column.cc index 5c344836d4..e68395807d 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -36,6 +36,7 @@ ADD_INTERFACE (Paper_column, "paper-column-interface", Don't be confused by right-items: each spacing wish can also contain a number of items, with which a spacing constraint may be kept. It's a little baroque, but it might come in handy later on? + ", "between-cols between-system-string when bounded-by-me shortest-playing-duration shortest-starter-duration"); diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index b83f13aebf..fb928d393a 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -333,15 +333,10 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged) const positions->config_.push (indent_f_); for (int i=0; i config_.push (positions->config_.top () + springs_[i].length (0.0)); - } - else - { - positions->config_.push (positions->config_.top () + springs_[i].length (force_f_)); - } + Real l = springs_[i].length ((ragged) ? 0.0 : force_f_); + positions->config_.push (positions->config_.top () + l); + + assert (l >= 0); } positions->cols_ = spaced_cols_; positions->loose_cols_ = loose_cols_; diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 7afd12e77c..803265d12a 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -23,14 +23,13 @@ #include "spring.hh" #include "paper-column.hh" #include "spaceable-grob.hh" +#include "break-align-interface.hh" + + + /* paper-column: - - Don't be confused by right-items: each spacing wish can also contain - a number of items, with which a spacing constraint may be kept. It's - a little baroque, but it might come in handy later on? - */ class Spacing_spanner { @@ -104,6 +103,28 @@ loose_column (Grob *l, Grob *c, Grob *r) if (!l_neighbor || !r_neighbor) return false; + + /* + A rather hairy check, but we really only want to move around clefs. (anything else?) + + in any case, we don't want to move bar lines. + */ + for (SCM e = c->get_grob_property ("elements"); gh_pair_p (e); e = gh_cdr (e)) + { + Grob * g = unsmob_grob (gh_car (e)); + if (g && Break_align_interface::has_interface (g)) + { + for (SCM s = g->get_grob_property ("elements"); gh_pair_p (s); + s = gh_cdr (s)) + { + Grob *h = unsmob_grob (gh_car (s)); + + if (h && h->get_grob_property ("break-align-symbol") == ly_symbol2scm ("bar-line")) + return false; + } + } + } + /* Only declare loose if the bounds make a little sense. This means some cases (two isolated, consecutive clef changes) won't be diff --git a/make/ly-rules.make b/make/ly-rules.make index 6c21074901..acaa410b18 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -6,14 +6,16 @@ $(outdir)/%.latex: %.doc rm -f $@ $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES)\ -$(LILYPOND_BOOK_FLAGS) --dependencies --outdir=$(outdir) $< +$(LILYPOND_BOOK_FLAGS) --verbose --dependencies --outdir=$(outdir) $< chmod -w $@ # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --srcdir builds $(outdir)/%.texi: %.tely rm -f $@ - $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi $(LILYPOND_BOOK_FLAGS) $< + set|egrep '(TEX|LILY)' + + $(PYTHON) $(LILYPOND_BOOK) $(LILYPOND_BOOK_INCLUDES) --dependencies --outdir=$(outdir) --format=texi --verbose $(LILYPOND_BOOK_FLAGS) $< chmod -w $@ $(outdir)/%.texi: $(outdir)/%.tely diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm index be293a5b76..5217d00c81 100644 --- a/scm/basic-properties.scm +++ b/scm/basic-properties.scm @@ -27,7 +27,9 @@ ("|s" . (() . "|")) ("|:" . ("|" . "|:")) ("|." . ("|." . ())) - (".|" . (() . ".|")) + + ;; hmm... should we end with a barline here? + (".|" . ("|" . ".|")) (":|" . (":|" . ())) ("||" . ("||" . ())) (".|." . (".|." . ())) diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 2f0bf3a7a0..cbb84e7b84 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -631,7 +631,7 @@ re_dict = { 'verb': r'''(?P@code{.*?})''', 'lilypond-file': '(?m)^(?P@lilypondfile(\[(?P[^]]*)\])?{(?P[^}]+)})', 'lilypond' : '(?m)^(?P@lilypond(\[(?P[^]]*)\])?{(?P.*?)})', - 'lilypond-block': r'''(?ms)^(?P@lilypond(\[(?P[^]]*)\])?\s(?P.*?)@end lilypond)\s''', + 'lilypond-block': r'''(?ms)^(?P@lilypond(\[(?P[^]]*)\])?\s(?P.*?)@end +lilypond)\s''', 'option-sep' : ',\s*', 'intertext': r',?\s*intertext=\".*?\"', 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P@ignore\s.*?@end ignore)\s", -- 2.39.2