-1.3.94.uu1
-==========
+1.3.95.jcn5
+===========
+
+* Added friendly message for the clueless dvips user.
+
+* Clef-engraver: changed c0-position, clef-position and glyph into properties,
+ enabling ottava spanners: input/test/ottava.ly.
+
+* Added option for edge lines to Text spanner.
+
+* Bugfix for early initialisation of invalid (grace->voice) slur.
+
+* Dropped text support and padding of crescendo symbol. Horizontal
+ alignment of dynamics is handled by side-support, Text crescendos
+ use the generic Text spanner.
+
+* Added a generic Text spanner.
+
+1.3.95.hwn1
+===========
+
+* Bugfix: octavate eight.
+
+* Rewrote arpeggio.
+
+* mudela-book fixes (Tom Cato)
+
+* Cleaned up Group_interface and Pointer_group_interface
+
+* Add accidentals to arpeggio support.
+
+* Stemup + barline combination gets extra space.
+
+* Score_element::extent () now takes a reference point argument.
+
+1.3.95
+======
* Use music property for setting type. This prevents accidental
forgotten copies.
@mudelafile{dyn-line.ly}
+
+Arpeggios are supported, both cross-staff and one-staff.
+
+@mudelafile{arpeggio.ly}
+
+
+
@section Chord names
Chord names are generated from a list pitches, and are customisable
+% kommentar
\documentclass[a4paper, 12pt]{article}
-%\def\pre MudelaExample{This if before}
-%\def\pre MudelaExample{This is after}
+%\def\preMudelaExample{}
+%\def\postMudelaExample{}
+%\usepackage{graphics}
%\usepackage{landscape}
\begin{document}
%uncomment this to try twocolumn mode
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=95
+PATCH_LEVEL=96
MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
\score{
\context PianoStaff <
\context Staff=one \notes\relative c''{
- fis,\arpeggio
+ \context Voice < fis,-\arpeggio d a >
%%\property PianoStaff.SpanArpeggio \push #'connect = ##t
\property PianoStaff.connectArpeggios = ##t
<fis,\arpeggio a c>
}
\context Staff=two \notes\relative c{
\clef bass;
- g
+ \context Voice < g b d-\arpeggio >
<g\arpeggio b d>
}
>
#include "score-element.hh"
#include "stem.hh"
#include "staff-symbol-referencer.hh"
+#include "staff-symbol.hh"
+#include "warn.hh"
bool
Arpeggio::has_interface (Score_element* me)
{
Score_element *me = unsmob_element (smob);
- Interval iv;
+ Score_element * common = me;
for (SCM s = me->get_elt_property ("stems"); gh_pair_p (s); s = gh_cdr (s))
{
- Score_element *stem = unsmob_element (gh_car (s));
- iv.unite (Stem::head_positions (stem));
+ Score_element * stem = unsmob_element (gh_car (s));
+ common = common->common_refpoint (Staff_symbol_referencer::staff_symbol_l (stem),
+ Y_AXIS);
}
+ /*
+ TODO:
+
+ Using stems here is not very convenient; should store noteheads
+ instead, and also put them into the support. Now we will mess up
+ in vicinity of a collision.
+
+ */
+ Interval heads;
+ Real my_y = me->relative_coordinate (common, Y_AXIS);
+
+ for (SCM s = me->get_elt_property ("stems"); gh_pair_p (s); s = gh_cdr (s))
+ {
+ Score_element * stem = unsmob_element (gh_car (s));
+ Score_element * ss = Staff_symbol_referencer::staff_symbol_l (stem);
+ Interval iv =Stem::head_positions (stem);
+ iv *= Staff_symbol::staff_space (ss)/2.0;
+
+ heads.unite (iv + ss->relative_coordinate (common, Y_AXIS)
+ - my_y);
+ }
+
+ if (heads.empty_b ())
+ {
+ programming_error ("Huh? Dumb blonde encountered?");
+ /*
+ Nee Valerie, jij bent _niet_ dom.
+ */
+ return SCM_EOL;
+ }
+
Molecule mol;
Molecule arpeggio = me->paper_l ()->lookup_l (0)->afm_find ("scripts-arpeggio");
- Real staff_space = Staff_symbol_referencer::staff_space (me);
- for (int i = (int)iv[MIN]/ 2; i < (int)(iv[MAX] - 1)/ 2; i++)
+
+ Real y = heads[LEFT];
+ while (y < heads[RIGHT])
{
- Molecule a (arpeggio);
- a.translate_axis (i * staff_space, Y_AXIS);
- mol.add_molecule (a);
+ mol.add_at_edge (Y_AXIS, UP,arpeggio, 0.0);
+ y+= arpeggio. extent (Y_AXIS).length ();
}
- mol.translate (Offset (-2 * staff_space, 0));
+ mol.translate_axis (heads[LEFT], Y_AXIS);
return mol.create_scheme ();
}
+/*
+ We have to do a callback, because brew_molecule () triggers a
+ vertical alignment if it is cross-staff.
+*/
+MAKE_SCHEME_CALLBACK(Arpeggio, width_callback,2);
+SCM
+Arpeggio::width_callback (SCM smob, SCM axis)
+{
+ Score_element * me = unsmob_element (smob);
+ Axis a = (Axis)gh_scm2int (axis);
+ assert (a == X_AXIS);
+ Molecule arpeggio = me->paper_l ()->lookup_l (0)->afm_find ("scripts-arpeggio");
+ return ly_interval2scm (arpeggio.extent (X_AXIS));
+}
%s
\end{mudela}""",
'output-verbatim': "\\begin{verbatim}%s\\end{verbatim}",
- 'output-default-post': r"""\def\postMudelaExample{}""",
- 'output-default-pre': r"""\def\preMudelaExample{}""",
+ 'output-default-post': "\\def\postMudelaExample{}\n",
+ 'output-default-pre': "\\def\preMudelaExample{}\n",
+ 'usepackage-graphics': '\\usepackage{graphics}\n',
'output-eps': '\\noindent\\parbox{\\mudelaepswidth{%(fn)s.eps}}{\includegraphics{%(fn)s.eps}}',
'output-tex': '\\preMudelaExample \\input %(fn)s.tex \\postMudelaExample\n',
'pagebreak': r'\pagebreak',
'mudela-block': r"(?sm)^[^%\n]*?(?P<match>\\begin(\[(?P<options>.*?)\])?{mudela}(?P<code>.*?)\\end{mudela})",
'def-post-re': r"\\def\\postMudelaExample",
'def-pre-re': r"\\def\\preMudelaExample",
+ 'usepackage-graphics': r"\usepackage{graphics}",
'intertext': r',?\s*intertext=\".*?\"',
'multiline-comment': no_match,
- 'singleline-comment': r"(?m)(?P<code>^%.*$\n+)",
+ 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>^%.*$\n+))",
'numcols': r"(?P<code>\\(?P<num>one|two)column)",
},
scan_latex_preamble(chunks)
-def completize_preamble (str):
- m = get_re ('preamble-end').search( str)
- if not m:
- return str
-
- preamble = str [:m.start (0)]
- str = str [m.start(0):]
-
- if not get_re('def-post-re').search (preamble):
- preamble = preamble + get_output('output-default-post')
- if not get_re ('def-pre-re').search( preamble):
- preamble = preamble + get_output ('output-default-pre')
-
- # UGH ! BUG!
- #if re.search ('\\\\includegraphics', str) and not re.search ('usepackage{graphics}',str):
-
- preamble = preamble + '\\usepackage{graphics}\n'
-
- return preamble + str
+def completize_preamble (chunks):
+ if __main__.format == 'texi':
+ return chunks
+ pre_b = post_b = graphics_b = None
+ for chunk in chunks:
+ if chunk[0] == 'preamble-end':
+ break
+ if chunk[0] == 'input':
+ m = get_re('def-pre-re').search(chunk[1])
+ if m:
+ pre_b = 1
+ if chunk[0] == 'input':
+ m = get_re('def-post-re').search(chunk[1])
+ if m:
+ post_b = 1
+ if chunk[0] == 'input':
+ m = get_re('usepackage-graphics').search(chunk[1])
+ if m:
+ graphics_b = 1
+ x = 0
+ while chunks[x][0] != 'preamble-end':
+ x = x + 1
+ if not pre_b:
+ chunks.insert(x, ('input', get_output ('output-default-pre')))
+ if not post_b:
+ chunks.insert(x, ('input', get_output ('output-default-post')))
+ if not graphics_b:
+ chunks.insert(x, ('input', get_output ('usepackage-graphics')))
+ return chunks
read_files = []
else:
newchunks.append (c)
chunks = newchunks
-
- if chunks and chunks[0][0] == 'input':
- chunks[0] = ('input', completize_preamble (chunks[0][1]))
-
+ x = 0
+ chunks = completize_preamble (chunks)
foutn = os.path.join(g_outdir, my_outname + '.' + format)
sys.stderr.write ("Writing `%s'\n" % foutn)
fout = open (foutn, 'w')