* Fixed markup text kerning, see input/test/metronome.ly.
(Ugh, only feasible if kerning is first markup -- markup text should be revised.)
-1.3.112.jcn2
-============
-
-* Fixed stem-tremolo (caching problem).
-
-1.3.112.jcn1
-============
+* Fixed molecule caching problem with stem-tremolo: fixes vertical
+positioning of stem-tremolo.
* Added forced slur direction (stemUp no longer implies slurUp) in
cross-staff slur example.
* Fixes to Glissando and line-spanner. Behaves reasonably across line
breaks.
+* Added: Align_interface::fixed_distance_alignment_callback that does
+not compute the extents of the to-be-aligned objects. This delays many
+brew_molecule() calls, because staff-height is no longer needed for
+aligning.
-1.3.111.jcn3
-============
+* Bugfix: allows linebreaks for some types of beam.
+
+* Bugfix: add braces in larger size range; prevents "Unknown character
+127" messages, hopefully.
+
+1.3.112
+=======
* Allow two consecutive glissandi.
* Added simple glissando line.
-* Bugfix: broken [crescendo] text spanner.
+* Bugfix: broken text spanner (ie. crescendo)
* Bugfix: chord tremolos
text text text text text text text text text text text text
text text text text text text text text text text text text
-%% need to use an -I ../../../input/test to find the file
-%% \lilypondfile{tie.ly}
+
\end{document}
The result is a text document with formatted music integrated.
@command{lilypond-book} will do its best to try to align the music to
-the left and right margins. Currently all papersizes, one- and
-twocolumn mode and the @code{geometry} package is supported.
-The TeXinfo command @code{pagesize} is on the TODO list for Lilypond 1.4.
-But changing the linewidth in other ways will not give you a straight
-right margin.
+the left and right margins. Currently the most used papersizes and
+one- and twocolumn mode is supported. But if you use some more
+advances features, like the geometry-package or change the margins in
+La@TeX{} or use @code{@@pagesize} in texinfo, will break.
This document assumes you have basic knowledge of GNU LilyPond and
La@TeX{} or texinfo.
These commands should be in the beginning of the document:
@itemize @bullet
@item @code{@@afourpaper}
-@item @code{@@afourlatex}
@item @code{@@afourwide}
@item @code{@@smallbook}
@end itemize
-@code{@@pagesizes} are not yet supported.
+@code{@@pagesizes} are not supported.
@subsection Examples
\lilypond@{ YOUR LILYPOND CODE @}
@end example
+The 'geometry' package is is not supported. The most popular
+papersizes should work.
+
Lilypond-book know about the @code{\onecolumn} and
-@code{\twocolumn} commands, the @code{geometry} package and
-all the standard paper sizes.
+@code{\twocolumn} commands.
The music will be surrounded by @code{\preLilypondExample} and
@code{\postLilypondExample}. The variables are
@strong{[UGH: THIS DOES NOT HAPPEN WHEN
YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]}
+@subsection @code{landscape} package
+There is some simple support for landscape paper format, and this
+can be combined with the @code{\twocolumn} command. Only a4 and
+letter paper is supported, more to come...
+
+A more complete
+support, maybe also supporting the geometry package is planned, but
+there are more work that has to be done on @command{lilypond-book}
+first.
+
+This should work:
+@example
+\documentclass@{article@}
+\usepackage@{landscape@}
+\begin@{document@}
+\twocolumn
+BLA BLA BLA
+\end@{document@}
+@end example
+
@subsection Examples
@example
If you use @code{--outdir}, you should also @code{cd} to that directory
before running LaTeX or makeinfo.
-@strong{[UGH: IS THIS THE BEST WAY TO DO IT? MAYBE ADD A COMMENT LINE TO THE
+@strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE
GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
IS GENERATED.]}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=112
-MY_PATCH_LEVEL=tca1
+PATCH_LEVEL=113
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
Grob * par = me->parent_l (ax);
if (par && !to_boolean (par->get_grob_property ("alignment-done")))
{
- Align_interface::do_side_processing (par, ax);
+ Align_interface::align_to_extents (par, ax);
}
return gh_double2scm (0.0);
}
+MAKE_SCHEME_CALLBACK(Align_interface,fixed_distance_alignment_callback,2);
+SCM
+Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
+{
+ Grob * me = unsmob_grob (element_smob);
+ Axis ax = (Axis )gh_scm2int (axis);
+ Grob * par = me->parent_l (ax);
+ if (par && !to_boolean (par->get_grob_property ("alignment-done")))
+ {
+ Align_interface::align_to_fixed_distance (par, ax);
+ }
+ return gh_double2scm (0.0);
+}
+
+void
+Align_interface::align_to_fixed_distance (Grob *me , Axis a)
+{
+ me->set_grob_property ("alignment-done", SCM_BOOL_T);
+
+ SCM d = me->get_grob_property ("stacking-dir");
+
+
+ Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER;
+ if (!stacking_dir)
+ stacking_dir = DOWN;
+
+
+ SCM force = me->get_grob_property ("forced-distance");
+
+ Real dy = 0.0;
+ if (gh_number_p (force))
+ {
+ dy = gh_scm2double (force);
+ }
+
+ Link_array<Grob> elems
+ = Pointer_group_interface__extract_elements ( me, (Grob*) 0, "elements");
+ Real where_f=0;
+ for (int j=0 ; j < elems.size(); j++)
+ {
+ where_f += stacking_dir * dy;
+ elems[j]->translate_axis (where_f, a);
+ }
+}
/*
Hairy function to put elements where they should be. Can be tweaked
from the outside by setting minimum-space and extra-space in its
children */
void
-Align_interface::do_side_processing (Grob * me, Axis a)
+Align_interface::align_to_extents (Grob * me, Axis a)
{
me->set_grob_property ("alignment-done", SCM_BOOL_T);
SCM d = me->get_grob_property ("stacking-dir");
+
+
Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER;
if (!stacking_dir)
stacking_dir = DOWN;
+
+
+ Interval threshold = Interval (0, Interval::infinity ());
+ SCM thr = me->get_grob_property ("threshold");
+ if (gh_pair_p (thr))
+ {
+ threshold[SMALLER] = gh_scm2double (gh_car (thr));
+ threshold[BIGGER] = gh_scm2double (gh_cdr (thr));
+ }
+
Array<Interval> dims;
dims.push (y);
}
}
-
- Interval threshold = Interval (0, Interval::infinity ());
- SCM thr = me->get_grob_property ("threshold");
- if (gh_pair_p (thr))
- {
- Real ss = 1.0;
- threshold[SMALLER] = ss *gh_scm2double (gh_car (thr));
- threshold[BIGGER] = ss * gh_scm2double (gh_cdr (thr));
- }
-
+
Real where_f=0;
for (int j=0 ; j < elems.size(); j++)
{
- Real dy = - stacking_dir * dims[j][-stacking_dir];
+ Real dy = 0.0;
+ dy = - stacking_dir * dims[j][-stacking_dir];
if (j)
dy += stacking_dir * dims[j-1][stacking_dir];
-
+
if (j)
{
dy = (dy >? threshold[SMALLER] )
}
void
-Align_interface::add_element (Grob*me,Grob* s)
+Align_interface::add_element (Grob*me,Grob* s, SCM cb)
{
- s->add_offset_callback (Align_interface::alignment_callback_proc, Align_interface::axis (me));
+ s->add_offset_callback (cb, Align_interface::axis (me));
Axis_group_interface::add_element (me, s);
}
if (now_column_l_)
{
-
- Align_interface::add_element (align_item_p_,now_column_l_);
+ Align_interface::add_element (align_item_p_,now_column_l_, Align_interface::alignment_callback_proc);
now_column_l_ =0;
}
}
virtual void create_grobs ();
virtual void acknowledge_grob (Grob_info);
virtual bool try_music (Music*);
+ virtual void process_music ();
public:
Beam_engraver ();
daddy_trans_l_->set_property ("beamMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F);
}
-
void
-Beam_engraver::create_grobs ()
+Beam_engraver::process_music ()
{
if (reqs_drul_[STOP])
{
else
e->forbid_breaks ();
}
-
+}
+
+
+void
+Beam_engraver::create_grobs ()
+{
if (reqs_drul_[START])
{
if (beam_p_)
/*
Force callbacks for alignment to be called
*/
- Align_interface::do_side_processing (me, X_AXIS);
+ Align_interface::align_to_extents (me, X_AXIS);
Real pre_space = elems[0]->relative_coordinate (column, X_AXIS);
#include "spanner.hh"
#include "warn.hh"
#include "paper-def.hh"
+
+
/*
JUNKME
*/
if (Align_interface::has_interface (common) && Align_interface::axis(common) == Y_AXIS)
{
- SCM threshold = common->get_grob_property ("threshold");
- if (!gh_pair_p (threshold)
- || !scm_equal_p (gh_car (threshold), gh_cdr (threshold)))
- warning (_ ("minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken"));
-
-
-
+ SCM threshold = common->get_grob_property ("forced-distance");
interstaff = 1.0;
- if (gh_pair_p (threshold))
- interstaff = gh_scm2double (gh_car (threshold)) * interstaff;
+ if (!gh_number_p (threshold))
+ warning (_ ("not a forced distance; cross-staff spanners may be broken"));
+ else
+ interstaff *= gh_scm2double (threshold);
Grob * span_refpoint = span;
while (span_refpoint->parent_l (Y_AXIS) != common)
struct Align_interface {
DECLARE_SCHEME_CALLBACK(alignment_callback, (SCM element, SCM axis));
- static void do_side_processing (Grob*,Axis a);
+ DECLARE_SCHEME_CALLBACK(fixed_distance_alignment_callback, (SCM element, SCM axis));
+ static void align_to_fixed_distance (Grob*,Axis a);
+ static void align_to_extents (Grob*,Axis a);
static void set_axis (Grob*,Axis);
static Axis axis (Grob*) ;
- static void add_element (Grob*,Grob*);
+ static void add_element (Grob*,Grob*, SCM callback);
static int get_count (Grob*,Grob*);
static void set_interface (Grob*);
static bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK(center_on_element, (SCM element, SCM axis));
};
#endif /* ALIGN_INTERFACE_HH */
{
/* TODO:make this settable?
*/
- if (note_end_mom_ > now_mom())
+ if (note_end_mom_ > now_mom() )
{
Score_engraver * e = 0;
Translator * t = daddy_grav_l ();
{
if (qualifies_b (i))
{
- Align_interface::add_element (valign_p_,i.elem_l_);
+ Align_interface::add_element (valign_p_,i.elem_l_, get_property ("verticalAlignmentChildCallback"));
}
}
\consists "Vertical_align_engraver";
alignmentReference = \center;
- VerticalAlignment \override #'threshold = #'(12 . 12)
+ verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
+ VerticalAlignment \override #'forced-distance = #12
% \consistsend "Axis_group_engraver";
}
scriptDefinitions = #default-script-alist
+ verticalAlignmentChildCallback = #Align_interface::alignment_callback
+
startSustain = #"Ped."
stopSustain = #"*"
stopStartSustain = #"*Ped."
% contributed by Paolo Zuliani <zuliap@easynet.it>
-\pitchnames #'(
+\pitchnames #`(
(dobb . ,(make-pitch -1 0 -2 ))
(dob . ,(make-pitch -1 0 -1 ))
(do . ,(make-pitch -1 0 0 ))
.SUFFIXES: .doc .dvi .mudtex .tely .texi
-SUBST_TEXI_DEPS=sed 's! \.\./! !g' < $(basename $@).dep > $(outdir)/temp.dep ; mv $(outdir)/temp.dep $(basename $@).dep
$(outdir)/%.latex: %.doc
rm -f $@
LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $<
chmod -w $@
- $(SUBST_TEXI_DEPS)
# don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
# it is not, for --scrdir builds
$(outdir)/%.texi: %.tely
rm -f $@
LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --format=texi $<
- $(SUBST_TEXI_DEPS)
chmod -w $@
# nexi: no-lily texi
rm -f $@
LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
mv $(@D)/$(*F).texi $@
- $(SUBST_TEXI_DEPS)
chmod -w $@
# nfo: info from non-lily texi
Begin3
Title: LilyPond
-Version: 1.3.112
-Entered-date: 28NOV00
+Version: 1.3.113
+Entered-date: 29NOV00
Description:
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.3.112.tar.gz
+ 1000k lilypond-1.3.113.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.112.tar.gz
+ 1000k lilypond-1.3.113.tar.gz
Copying-policy: GPL
End
%define info yes
Name: lilypond
-Version: 1.3.112
+Version: 1.3.113
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.112.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.113.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
enddef;
-for h := 2 staffsize# step 1 pt# until (7 * staffsize#):
+for x := 1 step 1 until 160:
% note: define_pixels (x) multiplies x by hppp,
% we must never get bigger than infinity
- draw_brace (min (h, infinity/hppp - 1), staff_space#);
+ draw_brace (min (x * pt#, infinity/hppp - 1), staff_space#);
endfor
(elt-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.")
(elt-property-description 'glyph symbol? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. ")
+(elt-property-description 'gap number? "Size of a gap in a variable symbol")
(elt-property-description 'glyph-name string? "a name of character within font")
(elt-property-description 'grow-direction dir? "crescendo or decrescendo?")
(elt-property-description 'thick-thickness number? "thickness, measured in stafflinethickness")
(elt-property-description 'thickness number? "thickness, measured in stafflinethickness")
(elt-property-description 'thin-kern number? "space after a hair-line")
+(elt-property-description 'forced-distance number? "forced distance for an alignment")
(elt-property-description 'threshold number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
(elt-property-description 'transparent boolean? "This is almost the
same as setting molecule-callback to #f, but this retains the
we don't contain any interesting items after linebreaking, then
gracefully commit suicide. Objective: don't disgrace Lily by
typesetting empty lines in orchestral scores."
- '(
- items-worth-living
-
-
- )))
+ '( items-worth-living )
+))
(define line-spanner-interface
(lily-interface
"Generic line drawn between two objects, eg. for use with glissandi.
gap is measured in staff-spaces. "
- '(gap
- dash-period
- dash-length
- line-thickness
- type
- )
+ '(gap dash-period dash-length line-thickness type )
))
(define lyric-hyphen-interface
(translator-property-description 'unirhythm boolean? "set if unirhythm is detected")
(translator-property-description 'unisilence boolean? "set if unisilence is detected")
(translator-property-description 'unison boolean? "set if unisono is detected ")
+(translator-property-description 'verticalAlignmentChildCallback
+procedure? "what callback to add to children of a vertical alignment.
+It determines what alignment procedure is used on the alignment
+itself. ")
(translator-property-description 'voltaSpannerDuration moment? "maximum duration of the volta bracket.
Set to a duration to control the size of the brackets printed by
# * Figure out clean set of options. Hmm, isn't it pretty ok now?
# * add support for .lilyrc
# * EndLilyPondOutput is def'd as vfil. Causes large white gaps.
-# * texinfo: add support for @pagesize
-# todo: dimension handling (all the x2y) is clumsy. (tca: Thats
-# because the values are taken directly from texinfo.tex,
-# geometry.sty and article.cls. Give me a hint, and I'll
-# fix it.)
+# todo: dimension handling (all the x2y) is clumsy.
# This is was the idea for handling of comments:
# Multiline comments, @ignore .. @end ignore is scanned for
program_version = '@TOPLEVEL_VERSION@'
if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
- program_version = '1.3.113'
+ program_version = '1.3.106'
include_path = [os.getcwd()]
class TexiPaper:
def __init__(self):
- self.m_papersize = 'letterpaper'
+ self.m_papersize = 'a4'
self.m_fontsize = 12
def get_linewidth(self):
return texi_linewidths[self.m_papersize][self.m_fontsize]
'executivepaper':{10: 345, 11: 360, 12: 379}}
texi_linewidths = {
- 'afourpaper': {12: mm2pt(160)},
- 'afourwide': {12: in2pt(6.5)},
- 'afourlatex': {12: mm2pt(150)},
- 'smallbook': {12: in2pt(5)},
- 'letterpaper': {12: in2pt(6)}}
+ 'a4': {12: 455},
+ 'a4wide': {12: 470},
+ 'smallbook': {12: 361},
+ 'texidefault': {12: 433}}
option_definitions = [
('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'),
return re_dict[format][name]
def bounding_box_dimensions(fname):
- if g_outdir:
- fname = os.path.join(g_outdir, fname)
try:
fd = open(fname)
except IOError:
idx = 0
while 1:
if chunks[idx][0] == 'input':
- for s in ('afourpaper', 'afourwide', 'letterpaper',
- 'afourlatex', 'smallbook'):
- if string.find(chunks[idx][1], "@%s" % s) != -1:
- paperguru.m_papersize = s
+ if string.find(chunks[idx][1], "@afourpaper") != -1:
+ paperguru.m_papersize = 'a4'
+ elif string.find(chunks[idx][1], "@afourwide") != -1:
+ paperguru.m_papersize = 'a4wide'
+ elif string.find(chunks[idx][1], "@smallbook") != -1:
+ paperguru.m_papersize = 'smallbook'
idx = idx + 1
if idx == 10 or idx == len(chunks):
break