From f0dbfe0c2367654423824dc46f7d75c2d12f2009 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:56:00 +0000 Subject: [PATCH] lilypond-1.3.89 --- CHANGES | 58 ++++++++++++++++++++++++++++-- lily/mark-engraver.cc | 2 +- lily/rest-collision.cc | 2 +- lily/staff-symbol-referencer.cc | 2 +- lily/tuplet-spanner.cc | 2 +- lily/volta-spanner.cc | 2 +- scripts/mudela-book.py | 62 +++++++++++++++++++++++---------- 7 files changed, 104 insertions(+), 26 deletions(-) diff --git a/CHANGES b/CHANGES index 0ceb0ebc13..95feb90029 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,58 @@ -1.3.87.hwn1 +1.3.89 +====== + +* Some fixes to Coriolan. + +* Fixed some stupid core dumps processing Coriolan. + +* Fixed several problems with part-combiner's part-switching. + +* Fixes for ASCII output. + +* Added feature to part combiner that should allow part-switching only + for entire measures. Currently, it is controlled by a new + property changeMoments (A . B): + - only switch when !(A mod now), + - decide whether to switch based on music during time period B. + +* Made bugfix: Sequential_iterator::get_music (M): mustn't return music + later than M. + +* Added skip (M) to some iterators. + +* maintain minimum-length by shifting for hyphens at start of +line. (patch courtesy Christophe Rhodes) + +* mudela-book fixes (courtesy Tom Cato Amundsen): documentation +update, LaTeX example, landscape support. + +1.3.88.hwn2 =========== +* Added elt properties for Tie: + - details + - x-gap + - staffline-clearance + +* Added elt properties for Slur + - y-free + - details + +* Removed C++ support for barNumberScriptPadding, now in +generic-property.scm (but they're deprecated anyway) + +* Changed threshold in Align_interface to be in staffspace + +* changed minVerticalAlign and maxVerticalAlign to be in staffspace. +A better way: do \push #'threshold = #(cons A B ). (WARNING: +INCOMPATIBLE CHANGE) + +* moved translator definitions out of \paper { }, only instantiate in +\paper. + +1.3.88 +====== + * Sequential_iterator::get_music (), part combiner now works. * Changed paper variables into elt properties: @@ -10,7 +62,7 @@ - beam-flag-width-function to Beam. Grace_align_item: - - horizontal-space: spacing of is configurable + - horizontal-space: spacing of grace notes is configurable Volta_spanner: - height @@ -34,6 +86,8 @@ * added input/test/bagpipe.ly + + 1.3.87 ====== diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 9ada64765f..d58823470f 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -127,7 +127,7 @@ Mark_engraver::create_items (Request *rq) { text_p_ ->set_elt_property ("padding", - gh_double2scm(paper_l ()->get_var ("interline"))); + gh_double2scm(paper_l ()->get_var ("staffspace"))); } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index f5605bc667..952bded8fa 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -172,7 +172,7 @@ Rest_collision::do_shift (Score_element *me, SCM elts) return SCM_UNSPECIFIED; // staff ref'd? - Real staff_space = me->paper_l()->get_var ("interline"); + Real staff_space = me->paper_l()->get_var ("staffspace"); /* FIXME staff_space = rcol->rests[0]->staff_space (); diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index 85b52f5aab..b4a2351ea3 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -53,7 +53,7 @@ Staff_symbol_referencer::staff_space (Score_element*me) if (st) return Staff_symbol::staff_space (st); else if (me->pscore_l_ && me->paper_l ()) - return me->paper_l ()->get_var ("interline"); + return me->paper_l ()->get_var ("staffspace"); return 0.0; } diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index f154c010e5..34ed2efd0a 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -69,7 +69,7 @@ Tuplet_spanner::brew_molecule (SCM smob) Real ncw = column_arr.top ()->extent(X_AXIS).length (); Real w = dynamic_cast(me)->spanner_length () + ncw; - Real staff_space = me->paper_l ()->get_var ("interline"); + Real staff_space = me->paper_l ()->get_var ("staffspace"); Direction dir = Directional_element_interface::get (me); Real dy = gh_scm2double (me->get_elt_property ("delta-y")); SCM number = me->get_elt_property ("text"); diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index e244e6ad7c..1ce8128d9d 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -63,7 +63,7 @@ Volta_spanner::brew_molecule (SCM smob) no_vertical_end = false; #endif - Real staff_space = me->paper_l ()->get_var ("interline"); + Real staff_space = me->paper_l ()->get_var ("staffspace"); Real staff_thick = me->paper_l ()->get_var ("stafflinethickness"); Real half_space = staff_space / 2; Real left = dynamic_cast(me)->get_broken_left_end_align (); diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index c60924d434..85a055d175 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -1,7 +1,13 @@ #!@PYTHON@ # vim: set noexpandtab: -# TODO: Figure out clean set of options. -# add support for .lilyrc +# TODO: +# * Figure out clean set of options. +# * add support for .lilyrc +# * %\def\preMudelaExample should be ignored by mudela-book because +# it is commented out +# * if you run mudela-book once with --no-pictures, and then again +# without the option, then the pngs will not be created. You have +# to delete the generated .ly files and rerun mudela-book. import os import stat @@ -15,7 +21,7 @@ import __main__ program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.3.69-very-unstable' + program_version = '1.3.85' include_path = [os.getcwd()] @@ -36,18 +42,22 @@ default_text_fontsize = 12 # indices are no. of columns, papersize, fontsize # Why can't this be calculated? latex_linewidths = { - 1: {'a4':{10: 345, 11: 360, 12: 390}, - 'a5':{10: 276, 11: 276, 12: 276}, - 'b5':{10: 345, 11: 356, 12: 356}, - 'letter':{10: 345, 11: 360, 12: 390}, - 'legal': {10: 345, 11: 360, 12: 390}, - 'executive':{10: 345, 11: 360, 12: 379}}, - 2: {'a4':{10: 167, 11: 175, 12: 190}, - 'a5':{10: 133, 11: 133, 12: 133}, - 'b5':{10: 167, 11: 173, 12: 173}, - 'letter':{10: 167, 11: 175, 12: 190}, - 'legal':{10: 167, 11: 175, 12: 190}, - 'executive':{10: 167, 11: 175, 12: 184}}} + 1: { 'a4':{10: 345, 11: 360, 12: 390}, + 'a4-landscape': {10: 598, 11: 596, 12:592}, + 'a5':{10: 276, 11: 276, 12: 276}, + 'b5':{10: 345, 11: 356, 12: 356}, + 'letter':{10: 345, 11: 360, 12: 390}, + 'letter-landscape':{10: 598, 11: 596, 12:596}, + 'legal': {10: 345, 11: 360, 12: 390}, + 'executive':{10: 345, 11: 360, 12: 379}}, + 2: { 'a4':{10: 167, 11: 175, 12: 190}, + 'a4-landscape': {10: 291, 11: 291, 12: 291}, + 'a5':{10: 133, 11: 133, 12: 133}, + 'b5':{10: 167, 11: 173, 12: 173}, + 'letter':{10: 167, 11: 175, 12: 190}, + 'letter-landscape':{10: 270, 11: 267, 12: 269}, + 'legal':{10: 167, 11: 175, 12: 190}, + 'executive':{10: 167, 11: 175, 12: 184}}} texi_linewidths = { 'a4': {12: 455}, @@ -152,23 +162,27 @@ re_dict = { 'option-sep' : ', *', 'header': r"""\\documentclass(\[.*?\])?""", + # ^(?m)[^%]* is here so we can comment it out + 'landscape': r"^(?m)[^%]*\\usepackage{landscape}", 'preamble-end': '\\\\begin{document}', 'verbatim': r"""(?s)(?P\\begin{verbatim}.*?\\end{verbatim})""", 'verb': r"""(?P\\verb(?P.).*?(?P=del))""", 'mudela-file': r'\\mudelafile(\[(?P.*?)\])?\{(?P.+)}', - 'mudela' : '(?m)\\\\mudela(\[(?P.*?)\])?{(?P.*?)}', + 'mudela' : '(?m)^[^%]*?\\\\mudela(\[(?P.*?)\])?{(?P.*?)}', #'mudela-block': r"""(?m)^[^%]*?\\begin(\[(?P.*?)\])?{mudela}(?P.*?)\\end{mudela}""", 'mudela-block': r"""(?s)\\begin(\[(?P.*?)\])?{mudela}(?P.*?)\\end{mudela}""", 'def-post-re': r"""\\def\\postMudelaExample""", 'def-pre-re': r"""\\def\\preMudelaExample""", 'intertext': r',?\s*intertext=\".*?\"', - 'ignore': r"(?m)(?P%.*?^)", + #'ignore': r"(?m)(?P%.*?^)", + 'ignore': r"(?m)(?P^%.*)$", 'numcols': r"(?P\\(?Pone|two)column)", }, 'texi': { 'include': '@mbinclude[ \n\t]+(?P[^\t \n]*)', 'input': no_match, + 'landscape': no_match, 'header': no_match, 'preamble-end': no_match, 'verbatim': r"""(?s)(?P@example\s.*?@end example\s)""", @@ -235,12 +249,16 @@ def compose_full_body (body, opts): else: paper = 'letter' # yes, latex use letter as default, at least # my tetex distro + if 'landscape' in opts: + paper = paper + '-' + 'landscape' music_size = default_music_fontsize latex_size = default_text_fontsize for o in opts: m = re.search ('^(.*)paper$', o) if m: paper = m.group (1) + if 'landscape' in opts: + paper = paper + '-' + 'landscape' if g_force_mudela_fontsize: music_size = g_force_mudela_fontsize @@ -300,6 +318,9 @@ def scan_preamble (str): options = ['a4widepaper'] elif string.find(str[:x], "@smallbook") != -1: options = ['smallbookpaper'] + m = get_re ('landscape').search(str) + if m: + options.append('landscape') m = get_re ('header').search( str) # should extract paper & fontsz. if m and m.group (1): @@ -473,6 +494,7 @@ def schedule_mudela_block (chunk, extra_opts): TODO has format [basename, extension, extension, ... ] """ + #print "-schedule_mudela_block", extra_opts if len(chunk) == 3: (type, body, opts) = chunk complete_body = None @@ -571,7 +593,9 @@ def compile_all_files (chunks): if e == 'eps': eps.append (base) elif e == 'tex': - tex.append (base + '.ly') + #ugh + if base + '.ly' not in tex: + tex.append (base + '.ly') elif e == 'png' and g_do_pictures: png.append (base) d = os.getcwd() @@ -719,8 +743,8 @@ def do_file(input_filename): chunks = chop_chunks(chunks, 'mudela', make_mudela) chunks = chop_chunks(chunks, 'mudela-file', make_mudela_file) chunks = chop_chunks(chunks, 'mudela-block', make_mudela_block) - #for c in chunks: print c, "\n" chunks = chop_chunks(chunks, 'ignore', do_ignore) + #for c in chunks: print "c:", c chunks = chop_chunks(chunks, 'numcols', do_columns) global_options = scan_preamble(chunks[0][1]) chunks = process_mudela_blocks(my_outname, chunks, global_options) -- 2.39.5