From 1f8e901795b9d63007d9b1c916e0f255549672fe Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:04:23 +0000 Subject: [PATCH] lilypond-0.1.37 --- Documentation/lilypond.pod | 4 ++++ bin/make-website.pl | 8 ++++++++ lily/include/main.hh | 1 + lily/lookup.cc | 9 +++++++-- lily/main.cc | 6 ++++++ lily/p-score.cc | 2 ++ tex/fetdefs.tex | 18 ++++++++++-------- 7 files changed, 38 insertions(+), 10 deletions(-) diff --git a/Documentation/lilypond.pod b/Documentation/lilypond.pod index 0dc1ea97ca..fdee220387 100644 --- a/Documentation/lilypond.pod +++ b/Documentation/lilypond.pod @@ -61,6 +61,10 @@ Add F to the search path for input files. Make incompatible mudela version non-fatal. +=item B<--postscript, -p>, + +Try to use PostScript where possible. + =back =head1 FEATURES diff --git a/bin/make-website.pl b/bin/make-website.pl index 2f177c29b2..2159716e96 100644 --- a/bin/make-website.pl +++ b/bin/make-website.pl @@ -297,6 +297,7 @@ sub docxx_update print BANNER $ban; close BANNER; my_system("BANNEROPT=\"-B /tmp/lilybanner.html\" $depth/bin/out/make-docxx"); + unlink "/tmp/lilybanner.html"; } sub do_tar @@ -313,6 +314,12 @@ sub identify print STDERR "This is " . $id_str . "\n"; } +sub clean_tmp +{ + @a = ; + unlink @a; +} + sub main { identify; @@ -352,6 +359,7 @@ sub main edit_index; docxx_update; do_tar; + clean_tmp; } main; diff --git a/lily/include/main.hh b/lily/include/main.hh index 94ab8c5511..13f3c8fb7b 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -22,6 +22,7 @@ extern Sources* source_l_g; extern bool only_midi; extern int exit_status_i_; extern bool experimental_features_global_b; +extern bool postscript_global_b; extern String default_out_fn; diff --git a/lily/lookup.cc b/lily/lookup.cc index d2e4c12d90..8fa2679722 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -159,7 +159,7 @@ Lookup::streepje (int type) const Atom Lookup::hairpin (Real &wid, bool decresc) const { - bool embedded_b = experimental_features_global_b; + bool embedded_b = postscript_global_b; String embed; Atom ret; if (embedded_b) @@ -173,6 +173,12 @@ Lookup::hairpin (Real &wid, bool decresc) const } else { + if (wid > 32 * 6 PT) + { + warning (_("Crescendo too long (") + print_dimen (wid) + +_( ") shrinking (ugh)")); + wid = 32*6 PT; + } int idx = int (rint (wid / 6 PT)); if (!idx) idx ++; wid = idx*6 PT; @@ -182,7 +188,6 @@ Lookup::hairpin (Real &wid, bool decresc) const Array a; a.push (idx); ret.tex_ = substitute_args (ret.tex_, a); - } ret.dim_.x() = Interval (0,wid); diff --git a/lily/main.cc b/lily/main.cc index f88d3a20af..897c84daaa 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -24,6 +24,7 @@ static bool version_ignore_b = false; Sources* source_l_g = 0; bool only_midi = false; bool experimental_features_global_b = false; +bool postscript_global_b = false; int exit_status_i_; void destill_inname (String &name_str_r); @@ -37,6 +38,7 @@ Long_option_init theopts[] = { {1, "init", 'i'}, {1, "include", 'I'}, {0, "midi", 'M'}, + {0, "postscript", 'p'}, {0, "ignore-version", 'V'}, {0,0,0} }; @@ -58,6 +60,7 @@ usage() " -t, --test switch on experimental features\n" " -M, --midi produce midi output only\n" " -V, --ignore-version ignore mudela version\n" + " -p, --postscript try to use PostScript\n" "\n" "GNU LilyPond was compiled with the following settings:\n") #ifdef NDEBUG @@ -187,6 +190,9 @@ main (int argc, char **argv) case 'V': version_ignore_b = true; break; + case 'p': + postscript_global_b = true; + break; case 'd': set_debug (true); break; diff --git a/lily/p-score.cc b/lily/p-score.cc index 39ada58c3b..4ca78c5993 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -211,6 +211,8 @@ Paper_score::tex_output () if (experimental_features_global_b) tex_out << "\\turnOnExperimentalFeatures%\n"; + if (postscript_global_b) + tex_out << "\\turnOnPostScript%\n"; super_elem_l_->output_all (); tex_out << "\n\\EndLilyPondOutput"; outputter_l_ = 0; diff --git a/tex/fetdefs.tex b/tex/fetdefs.tex index 0301959589..85d4121aec 100644 --- a/tex/fetdefs.tex +++ b/tex/fetdefs.tex @@ -66,7 +66,6 @@ -\def\turnOnExperimentalFeatures{ % % WARNING: don't leave blank lines in the PS-code; they are @@ -74,6 +73,13 @@ % +\def\turnOnPostScript{ +\def\embeddedps##1{ + % + % This sets CTM so that you get to the currentpoint + % by executing a 0 0 moveto + \special{ps: @beginspecial @setspecial ##1 @endspecial} +} \special{ps: /draw_decresc { @@ -99,8 +105,9 @@ } def } +} - +\def\turnOnExperimentalFeatures{ % draw a slur in embedded postscript \special{ps: /xbow 1 3 div def @@ -164,12 +171,7 @@ } \def\embeddedtex#1{#1} -\def\embeddedps#1{ - % - % This sets CTM so that you get to the currentpoint - % by executing a 0 0 moveto - \special{ps: @beginspecial @setspecial #1 @endspecial} -} + \def\embeddedmf#1{ \edef\embedid{feta-sleur-\number\embedcount} \immediate\openout\embedfile=\embedid.mf -- 2.39.5