From: Han-Wen Nienhuys Date: Fri, 29 Oct 2004 15:09:04 +0000 (+0000) Subject: * lily/ledger-line-spanner.cc (print): swap linear_combination X-Git-Tag: release/2.4.2~25 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=db4dd36b622417b5fe4c4a4660402e0ac7b5beb1;p=lilypond.git * lily/ledger-line-spanner.cc (print): swap linear_combination arguments, effectively shortens ledger line. * Documentation/user/GNUmakefile ($(outdir)/lilypond/lilypond.html): use find to remove files. * lily/main.cc: --no-pages option. --- diff --git a/ChangeLog b/ChangeLog index 699cb234e6..934572469f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-10-29 Han-Wen Nienhuys + + * lily/ledger-line-spanner.cc (print): swap linear_combination + arguments, effectively shortens ledger line. + + * Documentation/user/GNUmakefile + ($(outdir)/lilypond/lilypond.html): use find to remove files. + + * lily/main.cc: --no-pages option. + 2004-10-28 Carl Sorensen * Documentation/user/notation.itely (Fret diagrams): add extra diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 675608ff48..073924a74b 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -99,7 +99,7 @@ $(outdir)/lilypond/lilypond.html: $(outdir)/lilypond.texi $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $< $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html --no-split --no-headers $< perl -i~ -pe 's!../lilypond-internals!lilypond-internals/!g' $(outdir)/lilypond.html - rm -f $(outdir)/lilypond/*.png $(outdir)/lilypond/*.ly + find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f # symbolic links to save space (cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . ) diff --git a/Documentation/user/invoking.itely b/Documentation/user/invoking.itely index d0005ebde0..9bdbc0b22c 100644 --- a/Documentation/user/invoking.itely +++ b/Documentation/user/invoking.itely @@ -90,8 +90,9 @@ Set init file to @var{file} (default: @file{init.ly}). Generate PDF. This implies @code{--ps}. @item --preview Generate an output file containing the titles and the first system -of the score. - +@item --no-pages + Do not generate the full pages. Useful in combination with +@code{--preview}. @item -s,--safe Do not trust the @code{.ly} input. diff --git a/debian/control b/debian/control index 5cccf89d89..f64a3eb59b 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ Architecture: any Replaces: lilypond1.3 Provides: lilypond1.3 Depends: ${shlibs:Depends}, tetex-bin (>= 1.0.5-1), tetex-extra (>= 1.0-1), python, guile-1.6 | guile, ${misc:Depends}, lilypond-data (= ${Source-Version}) +# , ec-fonts-mftraced (>= 1.0.5-1) Recommends: lilypond-doc Conflicts: lilypond1.3 (<= 1.3.132-1), musixtex-fonts Description: A program for typesetting sheet music diff --git a/lily/include/main.hh b/lily/include/main.hh index 3e055091ac..bd71147357 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -45,6 +45,7 @@ extern bool make_ps; extern bool make_pdf; extern bool make_tex; extern bool make_preview; +extern bool make_pages; /* misc */ extern Array failed_files; diff --git a/lily/ledger-line-spanner.cc b/lily/ledger-line-spanner.cc index 200c1d9176..d2eda9a07e 100644 --- a/lily/ledger-line-spanner.cc +++ b/lily/ledger-line-spanner.cc @@ -207,7 +207,8 @@ Ledger_line_spanner::print (SCM smob) int pos = Staff_symbol_referencer::get_rounded_position (h); if (abs (pos) > interspaces + 1) { - Interval ledger_size = h->extent (common[X_AXIS], X_AXIS); + Interval head_size = h->extent (common[X_AXIS], X_AXIS); + Interval ledger_size = head_size; ledger_size.widen (ledger_size.length ()* length_fraction); Interval max_size = reqs[Paper_column::get_rank (h->get_column ())][Direction (sign(pos))].ledger_extent_; @@ -216,11 +217,11 @@ Ledger_line_spanner::print (SCM smob) Real left_shorten =0.0; if (Grob * g = unsmob_grob (h->get_property ("accidental-grob"))) { + Interval accidental_size = g->extent (common[X_AXIS], X_AXIS); Real d = - linear_combination (Drul_array (h->extent (common[X_AXIS], X_AXIS)[LEFT], - g->extent (common[X_AXIS], X_AXIS)[RIGHT]), - - 0.5); + linear_combination (Drul_array (accidental_size[RIGHT], + head_size[LEFT]), + 0.0); left_shorten = (-ledger_size[LEFT] + d) >? 0 ; diff --git a/lily/main.cc b/lily/main.cc index aeeaa51997..46dcf7e979 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -68,6 +68,7 @@ bool make_dvi = false; bool make_ps = false; bool make_png = false; bool make_preview = false; +bool make_pages = true; bool make_tex = false; /* @@ -135,6 +136,7 @@ static Long_option_init options_static[] = {0, "no-layout", 'm', _i ("produce MIDI output only")}, {_i ("FILE"), "output", 'o', _i ("write output to FILE")}, {0, "preview", 'p', _i ("generate a preview")}, + {0, "no-pages", 0, _i ("don't generate full pages")}, {0, "png", 0, _i ("generate PNG")}, {0, "ps", 0, _i ("generate PostScript")}, {0, "dvi", 0, _i ("generate DVI")}, @@ -386,6 +388,8 @@ parse_argv (int argc, char **argv) make_tex = true; else if (String (opt->longname_str0_) == "preview") make_preview = true; + else if (String (opt->longname_str0_) == "no-pages") + make_pages = false; break; case 'v': diff --git a/lily/paper-book.cc b/lily/paper-book.cc index 8a62290fc1..f7ead445a9 100644 --- a/lily/paper-book.cc +++ b/lily/paper-book.cc @@ -170,21 +170,23 @@ Paper_book::output (String outname) scopes = scm_cons (header_, scopes); String mod_nm = "scm framework-" + format; - - SCM mod = scm_c_resolve_module (mod_nm.to_str0 ()); - SCM func = scm_c_module_lookup (mod, "output-framework"); - func = scm_variable_ref (func); - scm_apply_0 (func, scm_list_n (out->self_scm (), - self_scm (), - scopes, - dump_fields (), - scm_makfrom0str (outname.to_str0 ()), - SCM_UNDEFINED)); - out->close (); - scm_gc_unprotect_object (out->self_scm ()); + SCM mod = scm_c_resolve_module (mod_nm.to_str0 ()); + if (make_pages) + { + SCM func = scm_c_module_lookup (mod, "output-framework"); - post_processing (mod, scm_makfrom0str (file_name.to_str0 ())); + func = scm_variable_ref (func); + scm_apply_0 (func, scm_list_n (out->self_scm (), + self_scm (), + scopes, + dump_fields (), + scm_makfrom0str (outname.to_str0 ()), + SCM_UNDEFINED)); + out->close (); + scm_gc_unprotect_object (out->self_scm ()); + post_processing (mod, scm_makfrom0str (file_name.to_str0 ())); + } if (make_preview) { diff --git a/make/lilypond.fedora.spec.in b/make/lilypond.fedora.spec.in index b843977b2b..b51f0a6de6 100644 --- a/make/lilypond.fedora.spec.in +++ b/make/lilypond.fedora.spec.in @@ -18,7 +18,7 @@ Buildrequires: t1utils bison flex mftrace ImageMagick Buildrequires: texinfo >= 4.6 Buildrequires: guile-devel >= 1.6.4-8 Requires: tetex tetex-latex libstdc++ python tetex-dvips tetex-latex -Requires: guile >= 1.6.4-8 ec-fonts-mftraced >= 1.0.4 +Requires: guile >= 1.6.4-8 ec-fonts-mftraced >= 1.0.5 %description LilyPond lets you create music notation. It produces