From: Han-Wen Nienhuys Date: Wed, 13 Jun 2001 15:39:22 +0000 (+0200) Subject: release: 1.4.3 X-Git-Tag: release/1.4.3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5e963da4031a9efceda94f4969785bf6fa13048b;p=lilypond.git release: 1.4.3 ========== * Windows: bugfix for tex-wrappers, added tex wrapper for dvips. LilyPond (read: ly2dvi) should now work right out of the box. Amazing; it seems that ly2dvi won't generate PK files without this dvips wrapper. We had over 200 downloads of setup.exe, yet only one `call for help'. Did all the others give up, or did none of them bother to share their fix/file a bug report? Urg. * Included mktexnam.patch (again?). * Documentation fix (Mark Hindley). * Debian patch and bashism fix (Anthony). * Bugfix: local-install should depend on $(INSTALLATION_FILES). This fixes ./configure; make install in buildscripts/ (Michael Vanier). * Removed les-nereides from short-examples, as it is tweaked a lot, contrary to what the webpage claims (didn't know that). 1.4.2. --- diff --git a/CHANGES b/CHANGES index bdb011f50e..af019b8376 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,6 @@ 1.4.2.jcn4 ========== -* Bugfix: ledger lines on easy-notation note heads. - * Windows: bugfix for tex-wrappers, added tex wrapper for dvips. LilyPond (read: ly2dvi) should now work right out of the box. @@ -11,9 +9,6 @@ dvips wrapper. We had over 200 downloads of setup.exe, yet only one `call for help'. Did all the others give up, or did none of them bother to share their fix/file a bug report? Urg. -1.4.2.jcn1 -========== - * Included mktexnam.patch (again?). * Documentation fix (Mark Hindley). @@ -26,6 +21,32 @@ bother to share their fix/file a bug report? Urg. * Removed les-nereides from short-examples, as it is tweaked a lot, contrary to what the webpage claims (didn't know that). +1.4.2.mb1 +========== + +* ly2dvi, titledefs.tex: Typeset copyright notice at the bottom of the +first page. Make separate page styles for first and last page. + +* Bugfix: Default RehearsalMark font-family changed to roman (only +affects Scheme text markups). + +1.4.2.hwn1 +========== + +* Added support for Q: statement to abc2ly. (Laura Conrad) + +* Tie shape bugfix (Mark Hindley). + +* Bugfix: lilypond-book LatexPaper.__setattr__() + +* Bugfix: make Hyphen_spanner::brew_molecule() more robust. + +* Don't use stdin when no argument specified. + +* Naming smobs -> grobs + +* Bugfix: ledger lines on easy-notation note heads. + 1.4.2 ===== diff --git a/Documentation/user/ly2dvi.itexi b/Documentation/user/ly2dvi.itexi index 10753f365c..c1ee6242fa 100644 --- a/Documentation/user/ly2dvi.itexi +++ b/Documentation/user/ly2dvi.itexi @@ -78,8 +78,11 @@ generate titling: @item head A text to print in the header of all pages. It is not called @code{header}, because @code{\header} is a reserved word in LilyPond. +@item copyright + A text to print in the footer of the first page. Default is to + print the standard footer also on the first page. @item footer - A text to print in the footer of all pages + A text to print in the footer of all but the last page. @item tagline Line to print at the bottom of last page. The default text is ``Lily was here, @var{version-number}''. diff --git a/Documentation/windows/latex-wrapper.sh b/Documentation/windows/latex-wrapper.sh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/INSTALL.txt b/INSTALL.txt index 3366d09d11..e0d285563e 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -74,8 +74,7 @@ released. * Debian GNU/Linux (ftp://ftp.debian.org/debian/pool/main/l/lilypond/) - * Windows Stable (http://home.austin.rr.com/jbr/jeff/lilypond/) - Windows Testing (http://www.lilypond.org/gnu-windows/) + * Windows Testing (http://www.lilypond.org/gnu-windows/) Upgrading @@ -93,10 +92,10 @@ Upgrading xdelta (ftp://ftp.xcf.berkeley.edu/pub/xdelta/). This is much safer than using patches, and is the recommended way. - The following command produces `lilypond-1.4.1.tar.gz' from - `lilypond-1.4.0.tar.gz' identical (up to compression dates) to the - .1 on the FTP site. - xdelta patch lilypond-1.4.0-1.4.1.xd lilypond-1.4.0.tar.gz + The following command produces `lilypond-1.4.3.tar.gz' from + `lilypond-1.4.2.tar.gz' identical (up to compression dates) to the + .3 on the FTP site. + xdelta patch lilypond-1.4.2-1.4.3.xd lilypond-1.4.2.tar.gz Requirements ============ @@ -357,7 +356,7 @@ Debian GNU/Linux A Debian package is also available. You may install it easily by running `apt-get' as root: - apt-get install lilypond + apt-get install lilypond lilypond-doc Debian's TeX installation is a bit short on memory, you may want to increase it like this: @@ -385,7 +384,7 @@ environment variables if you do not want to or cannot modify * http://people.debian.org/~foka/lilypond/ (http://people.debian.org/~foka/lilypond/) for latest - semi-unofficial build of LilyPond 1.3.121 for Debian 2.2 (potato) + semi-unofficial build of LilyPond 1.4.2 for Debian 2.2 (potato) users. The official stable Debian 2.2 is stuck with the old LilyPond-1.3.24. Since LilyPond-1.4 has been released, the older lilypond1.3 Debian package is now obsolete. @@ -399,15 +398,18 @@ the .deb by doing, for example: $ su - root # dpkg --purge lilypond lilypond1.3 # exit - $ tar xzf lilypond-1.4.1.tar.gz - $ cd lilypond-1.4.1 - $ dch -p -v 1.4.1-0.local.1 "Local build." - $ debuild + $ tar xzf lilypond-1.4.3.tar.gz + $ cd lilypond-1.4.3 + $ dch -p -v 1.4.3-0.local.1 "Local build." + $ debuild -B $ su - root - # dpkg -i ../lilypond_1.4.1*.deb + # dpkg -i ../lilypond_1.4.3*.deb # exit $ + Use command `debuild' instead of `debuild -B' if you have a very +fast machine and want to build the HTML, PS and DVI documentation too. + For compilation on a Debian GNU/Linux system you need these packages, in addition to the those needed for running: diff --git a/VERSION b/VERSION index 092f4484df..db44d17c8b 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=4 -PATCH_LEVEL=2 -MY_PATCH_LEVEL=jcn5 +PATCH_LEVEL=3 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/debian/lilypond1.3.copyright b/debian/lilypond1.3.copyright index 29e3390e68..0366d2af74 100644 --- a/debian/lilypond1.3.copyright +++ b/debian/lilypond1.3.copyright @@ -3,6 +3,27 @@ This is a dummy package to aid the transition from the old It was created by Anthony Fok Mon, 16 Apr 2001 22:17:10 -0600 +Copyright: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License with + the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; + if not, write to the Free Software Foundation, Inc., 59 Temple Place, + Suite 330, Boston, MA 02111-1307 USA +This is a dummy package to aid the transition from the old +"lilypond1.3" package to the newer "lilypond" package. +It was created by Anthony Fok +Mon, 16 Apr 2001 22:17:10 -0600 + Copyright: This program is free software; you can redistribute it and/or modify diff --git a/input/test/manual-volta.ly b/input/test/manual-volta.ly index ecb3ad4186..7f9042daca 100644 --- a/input/test/manual-volta.ly +++ b/input/test/manual-volta.ly @@ -2,10 +2,18 @@ \score { \notes { - c4 +% First a normal looking repeat: + c2 c + \property Score.repeatCommands = #'((volta "1.")) + c c + \property Score.repeatCommands = #'((volta #f) end-repeat (volta "2.")) + c c + \property Score.repeatCommands = #'((volta #f)) +% Then a more strange one: + c c \property Score.repeatCommands = #'((volta "93") end-repeat) - c4 c4 + c c \property Score.repeatCommands = #'((volta #f)) - c4 c4 + c c } } diff --git a/lily/grob.cc b/lily/grob.cc index db504faa81..f6c84bc079 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -347,7 +347,7 @@ Grob::add_dependency (Grob*e) representing the break direction. Do not modify SRC. */ SCM -Grob::handle_broken_smobs (SCM src, SCM criterion) +Grob::handle_broken_grobs (SCM src, SCM criterion) { again: Grob *sc = unsmob_grob (src); @@ -393,7 +393,7 @@ Grob::handle_broken_smobs (SCM src, SCM criterion) /* UGH! breaks on circular lists. */ - SCM newcar = handle_broken_smobs (oldcar, criterion); + SCM newcar = handle_broken_grobs (oldcar, criterion); SCM oldcdr = gh_cdr (src); if (newcar == SCM_UNDEFINED @@ -402,7 +402,7 @@ Grob::handle_broken_smobs (SCM src, SCM criterion) /* This is tail-recursion, ie. - return handle_broken_smobs (cdr, criterion); + return handle_broken_grobs (cdr, criterion); We don't want to rely on the compiler to do this. Without tail-recursion, this easily crashes with a stack overflow. */ @@ -410,7 +410,7 @@ Grob::handle_broken_smobs (SCM src, SCM criterion) goto again; } - SCM newcdr = handle_broken_smobs (oldcdr, criterion); + SCM newcdr = handle_broken_grobs (oldcdr, criterion); return gh_cons (newcar, newcdr); } else @@ -433,7 +433,7 @@ Grob::handle_broken_dependencies () Grob * sc = s->broken_into_l_arr_[i]; Line_of_score * l = sc->line_l (); sc->mutable_property_alist_ = - handle_broken_smobs (mutable_property_alist_, + handle_broken_grobs (mutable_property_alist_, l ? l->self_scm () : SCM_UNDEFINED); } } @@ -444,12 +444,12 @@ Grob::handle_broken_dependencies () if (line && common_refpoint (line, X_AXIS) && common_refpoint (line, Y_AXIS)) { mutable_property_alist_ - = handle_broken_smobs (mutable_property_alist_, + = handle_broken_grobs (mutable_property_alist_, line ? line->self_scm () : SCM_UNDEFINED); } else if (dynamic_cast (this)) { - mutable_property_alist_ = handle_broken_smobs (mutable_property_alist_, + mutable_property_alist_ = handle_broken_grobs (mutable_property_alist_, SCM_UNDEFINED); } else diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index 1a35efaaed..c222091ef4 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -58,8 +58,12 @@ Hyphen_spanner::brew_molecule (SCM smob) { bounds[LEFT] -= gh_scm2double (space); } - Real w = bounds.length (); + /* + we should probably do something more intelligent when bounds is + empty, but at least this doesn't crash. + */ + Real w = bounds.empty_b () ? 0 : bounds.length (); /* for length, use a geometric mean of the available space and some minimum */ @@ -93,9 +97,8 @@ Hyphen_spanner::brew_molecule (SCM smob) } Box b (Interval (-l/2,l/2), Interval (h,h+th)); Molecule mol (Lookup::filledbox (b)); - mol.translate_axis (bounds.center () - -sp->relative_coordinate (common, X_AXIS), - X_AXIS); + Real ct = bounds.empty_b () ? 0 : bounds.center () ; + mol.translate_axis (ct -sp->relative_coordinate (common, X_AXIS), X_AXIS); return mol.smobbed_copy (); } diff --git a/lily/include/grob.hh b/lily/include/grob.hh index dc95ba5143..2de2b88fc2 100644 --- a/lily/include/grob.hh +++ b/lily/include/grob.hh @@ -96,7 +96,7 @@ public: #funcptr# is the function to call to update this element. */ void calculate_dependencies (int final, int busy, SCM funcname); - static SCM handle_broken_smobs (SCM, SCM criterion); + static SCM handle_broken_grobs(SCM, SCM criterion); virtual void do_break_processing (); virtual Grob *find_broken_piece (Line_of_score*) const; diff --git a/lily/item.cc b/lily/item.cc index 6eeaf77503..52f647f732 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -143,7 +143,7 @@ Item::handle_prebroken_dependencies () if (original_l_) { mutable_property_alist_ - = handle_broken_smobs (original_l_->mutable_property_alist_, + = handle_broken_grobs(original_l_->mutable_property_alist_, gh_int2scm (break_status_dir ())); } diff --git a/lily/main.cc b/lily/main.cc index 703655df75..85a447ed20 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -332,20 +332,22 @@ main_prog (int, char**) gh_eval_str ((char *)init_scheme_code_string.ch_C()); int p=0; - const char *arg ; - while ((arg = oparser_p_static->get_next_arg ()) || p == 0) + const char *arg = oparser_p_static->get_next_arg (); + + if (!arg) + usage (); + else + do { - String infile; - - if (arg) - infile = arg; - else - infile = "-"; - - // What/when was this supposed to do? - // It looks like it reset the outname_str_global for every new - // file, but only if user didn't specify a outname? Huh? - // if (outname_str_global == "") + String infile (arg); + + /* What/when was this supposed to do? + It looks like it reset the outname_str_global for every new + file, but only if user didn't specify a outname? Huh? + + // if (outname_str_global == "") + + */ { Midi_def::reset_score_count (); Paper_def::reset_score_count (); @@ -381,8 +383,11 @@ main_prog (int, char**) output_name_global = save_output_name_global; p++; - } + + oparser_p_static->get_next_arg (); + } while ((arg = oparser_p_static->get_next_arg ())); delete oparser_p_static; + oparser_p_static = 0; exit (exit_status_global); } diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 890c0d1562..9870a13a88 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -42,8 +42,6 @@ Multi_measure_rest::percent (SCM smob) Grob *me = unsmob_grob (smob); Spanner *sp = dynamic_cast (me); - Font_metric *musfont = Font_interface::get_default_font (me); - Molecule r = Percent_repeat_item_interface::x_percent (me, 1, 0.75, 1.6); // ugh copy & paste. diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index 994288da64..cd11b6a89d 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -65,7 +65,6 @@ protected: protected: virtual void finalize (); virtual bool try_music (Music*); - virtual void acknowledge_grob (Grob_info); virtual void stop_translation_timestep (); virtual void start_translation_timestep (); virtual void process_music (); @@ -220,11 +219,6 @@ Percent_repeat_engraver::typeset_perc () } -void -Percent_repeat_engraver::acknowledge_grob (Grob_info info) -{ - -} void diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index db88dad85d..5d4b0a5e01 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -46,8 +46,11 @@ Stanza_number_engraver::acknowledge_grob (Grob_info i) if (now_mom () > Moment (0)) s = get_property ("stz"); - + + + // TODO if (gh_string_p (s)) + /* if (i.elem_l_->has_interface (symbol ("lyric-syllable-interface"))) diff --git a/lily/tie.cc b/lily/tie.cc index 6e605ea07f..ae2be9fc11 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -185,28 +185,16 @@ Tie::get_control_points (SCM smob) Bezier b = slur_shape (width, h_inf, r_0); - Offset leave_dir = b.control_[1] - b.control_[0]; - - Grob *hed =head (me, headdir); - Real dx = (hed->extent (hed, X_AXIS).length () + x_gap_f)/2.0; - Real max_gap = leave_dir[Y_AXIS] * dx / leave_dir[X_AXIS]; - /* - for small ties (t small) we want to start in the Y-center (so dy = 0), for - large ties, the tie should appear to come from the center of the - head, so dy = max_gap - - maybe use a different formula? + I think this better, particularly for small ties. It always allows the user to move ties if + they seem in the wrong place TODO: what if 2 heads have different size. - TODO: for small ties, it is better to start over the heads - iso. next to the heads. */ - Real t = (width / staff_space - 5.0); // ugh. - Real dy = t > 0 ? max_gap * sqr (t / (1 + t)) : 0.0; - Real ypos = Tie::position_f (me) * staff_space/2 + dir * dy; + Real ypos = Tie::position_f (me) * staff_space/2 + + dir * gh_scm2double (me->get_grob_property ("y-offset"));; /* Make sure we don't start on a dots diff --git a/lily/voice-devnull-engraver.cc b/lily/voice-devnull-engraver.cc index 94859cf819..7a8d460f99 100644 --- a/lily/voice-devnull-engraver.cc +++ b/lily/voice-devnull-engraver.cc @@ -58,7 +58,7 @@ Voice_devnull_engraver::try_music (Music *m) } } /* Ugh. Should eat other requests, script etc. too. */ - else if (Tie_req *t = dynamic_cast (m)) + else if (dynamic_cast (m)) return true; } return false; diff --git a/lilypond-font-lock.el b/lilypond-font-lock.el index 04553830ba..ee0b3c7553 100644 --- a/lilypond-font-lock.el +++ b/lilypond-font-lock.el @@ -38,7 +38,7 @@ "override" "set" "revert" "partial" "paper" "penalty" "property" "pt" "relative" "remove" "repeat" "addlyrics" "partcombine" "score" "script" "stylesheet" "skip" "textscript" "tempo" "translator" -"transpose" "type" +"transpose" "type" "unset" )) (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|"))) diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index e3b47930d0..bdfd4d266e 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.4.2 -Entered-date: 28MAY01 +Version: 1.4.3 +Entered-date: 13JUN01 Description: @BLURB@ Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.4.2.tar.gz + 1000k lilypond-1.4.3.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.4.2.tar.gz + 1000k lilypond-1.4.3.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.redhat.spec b/make/out/lilypond.redhat.spec index f257358cb2..a49a8b0011 100644 --- a/make/out/lilypond.redhat.spec +++ b/make/out/lilypond.redhat.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.4.2 +Version: 1.4.3 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.2.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.3.tar.gz Summary: Create and print music notation URL: http://www.cs.uu.nl/~hanwen/lilypond BuildRoot: /tmp/lilypond-install diff --git a/make/out/lilypond.suse.spec b/make/out/lilypond.suse.spec index f2d26441cf..4cca83ccca 100644 --- a/make/out/lilypond.suse.spec +++ b/make/out/lilypond.suse.spec @@ -14,11 +14,11 @@ Distribution: SuSE Linux 7.0 (i386) Name: lilypond -Version: 1.4.2 +Version: 1.4.3 Release: 2 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.2.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.4.3.tar.gz # music notation software for.. ? Summary: A program for printing sheet music. URL: http://www.lilypond.org/ diff --git a/scm/grob-description.scm b/scm/grob-description.scm index 78e498658d..9d19e537d0 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -316,7 +316,7 @@ (direction . 1) (breakable . #t) - (font-family . number) + (font-family . roman) (font-shape . upright) (font-relative-size . 1) (visibility-lambda . ,end-of-line-invisible) @@ -673,6 +673,7 @@ (details . ((ratio . 0.333) (height-limit . 1.0))) (thickness . 1.2) (x-gap . 0.2) + (y-offset . 0.6) (minimum-length . 2.5) (meta . ,(grob-description "Tie" tie-interface )) )) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index ef4cec6beb..023a24668b 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -362,4 +362,5 @@ function of type (beam multiplicity dy staff-line-thickness) -> real. Default v (grob-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics).") (grob-property-description 'x-gap number? "horizontal gap between notehead and tie.") (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.") +(grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.") (grob-property-description 'y number? "set by beam: position of left edge.") diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index c76574eba3..b4295e933f 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -87,7 +87,7 @@ names = ["One", "Two", "Three"] DIGITS='0123456789' alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ" HSPACE=' \t' - +midi_specs = '' def check_clef(s): if not s: @@ -205,6 +205,23 @@ def dump_voices (outf): outf.write("}") outf.write ("\n}") +def try_parse_q(a): + global midi_specs + #assume that Q takes the form "Q:1/4=120" + #There are other possibilities, but they are deprecated + if string.count(a, '/') == 1: + array=string.split(a,'/') + numerator=array[0] + if numerator != 1: + sys.stderr.write("abc2ly: Warning, unable to translate a Q specification with a numerator of %s: %s\n" % (numerator, a)) + array2=string.split(array[1],'=') + denominator=array2[0] + perminute=array2[1] + duration=str(string.atof(denominator)/string.atoi(numerator)) + midi_specs=string.join(["\\tempo", duration, "=", perminute]) + else: + sys.stderr.write("abc2ly: Warning, unable to parse Q specification: %s\n" % a) + def dump_score (outf): outf.write (r"""\score{ \notes < @@ -243,7 +260,7 @@ def dump_score (outf): outf.write ("\t\t\\StaffContext\n") # outf.write ("\t\t\\consists Staff_margin_engraver\n") outf.write ("\t }\n") - outf.write ("\t}\n\t\\midi {}\n}\n") + outf.write ("\t}\n\t\\midi {%s}\n}\n" % midi_specs) @@ -631,7 +648,8 @@ def try_parse_header_line (ln, state): lyrics_append(a) if g == 'w': # vocals slyrics_append (a) - + if g == 'Q': #tempo + try_parse_q (a) return '' return ln diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 8b560e8959..a9e53567ec 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -192,7 +192,7 @@ class LatexPaper: def __setattr__(self, name, value): if type(value) == type("") and \ dimension_conversion_dict.has_key (value[-2:]): - f = dimension_conversion_dict[dim] + f = dimension_conversion_dict[value[-2:]] self.__dict__[name] = f(float(value[:-2])) else: self.__dict__[name] = value diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 16d769ccb3..5ac6d69667 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -533,49 +533,23 @@ lily output file in TFILES after that, and return the Latex file constructed. ' s = s + r''' \usepackage[latin1]{inputenc} \input{titledefs} -\makeatletter -\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}% -\renewcommand{\@evenfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}% ''' if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no': - s = s + r''' -\renewcommand{\@evenhead}{\hbox to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}} -\renewcommand{\@oddhead}{\hbox to \textwidth{{\small\theheader}\hfill\textbf{\thepage}}} -''' + s = s + '\\pagestyle{plain}\n' else: s = s + '\\pagestyle{empty}\n' - s = s + '\\makeatother\n' s = s + '\\begin{document}\n' - + s = s + '\\thispagestyle{firstpage}\n' first = 1 for t in tfiles: s = s + one_latex_definition (t, first) first = 0 - s = s + r''' -%% I do not see why we want to clobber the footer here -%% \vfill\hfill\parbox{\textwidth}{\mbox{}\makelilypondtagline} -%% Well, maybe you don't submit music to mutopia? -%% I would not object to this kind of change, but I don't know how -%% to get the last mutopia tagline right (ie: no footer on last page) -%% Please check that mutopia footers and endfooter are OK before changing -%% this again. -- jcn -% the \mbox{} helps latex if people do stupid things in tagline -\makeatletter -\if@twoside - \ifodd\thepage - \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}% - \else - \renewcommand{\@evenfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}% - \fi - \else - \renewcommand{\@thefoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}% -\fi -\makeatother -''' + + s = s + '\\thispagestyle{lastpage}\n' s = s + '\\end{document}' return s diff --git a/tex/titledefs.tex b/tex/titledefs.tex index c41cb0b738..fd680ff7e4 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -55,17 +55,39 @@ % these names can't be changed: they're uses in mutopia headers \def\theheader { - \ifx\lilypondhead\undefined\else% + \ifx\lilypondhead\undefined\relax\else% \lilypondhead\fi } \def\thefooter { - \ifx\lilypondfooter\undefined\else% + \ifx\lilypondfooter\undefined\relax\else% \lilypondfooter\fi } \def\makelilypondtagline { - \ifx\lilypondtagline\undefined\else\lilypondtagline\fi + \ifx\undefined\lilypondtagline\relax\else\lilypondtagline\fi } +\def\thecopyright +{ + \ifx\lilypondcopyright\undefined\thefooter\else% + \lilypondcopyright\fi +} +% +% Moved header and footer definitions here from the ly2dvi script. +% Separate page styles for first, last and ordinary (plain) pages. +\makeatletter +\renewcommand{\ps@plain}{ + \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}% + \renewcommand{\@evenfoot}{\@oddfoot}% + \renewcommand{\@evenhead}{\hbox to\textwidth{\textbf{\thepage}\hfill{\small\theheader}}} + \renewcommand{\@oddhead}{\hbox to + \textwidth{{\small\theheader}\hfill\textbf{\thepage}}}} +\newcommand{\ps@firstpage}{ + \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thecopyright}}% + \renewcommand{\@evenfoot}{\@oddfoot}} +\newcommand{\ps@lastpage}{ + \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\makelilypondtagline}}% + \renewcommand{\@evenfoot}{\@oddfoot}} +\makeatother \endinput