2005-10-10 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/lily.scm (define-scheme-options): add paper-size option.
+
+ * ly/declarations-init.ly (laissezVibrer): get paper size from
+ -dpaper-size
+
+ * scm/translation-functions.scm: use \fontsize for changing the
+ fontsize.
+
+ * scm/define-grobs.scm (all-grob-descriptions): set
+ between-length-limit to 1.0
+
+ * lily/tie-helper.cc: add between_length_limit_ detail property.
+
+ * mf/feta-bolletjes.mf: typos.
+
* lily/note-head.cc (internal_print): don't shadow idx
parameter. This fixes wrong attachment for do shape heads.
@itemize @bullet
+@item
+The default paper size may now be set from the command line using
+@code{-dpaper-size}.
+
@item
Beamlets may stick out of the side of beams.
Real ratio_;
Real staff_space_;
Real x_gap_;
+ Real between_length_limit_;
Tie_details ();
void init (Grob *);
Grob *const &s2);
static Interval get_default_attachments (Spanner *me, Grob *common, Real gap,
- int *staff_position, bool *in_between);
+ int *staff_position, bool *in_between,
+ Tie_details const &);
};
}
+
void
Tie_details::init (Grob *me)
{
staff_space_ = Staff_symbol_referencer::staff_space (me);
SCM details = me->get_property ("details");
- SCM limit
- = scm_assq (ly_symbol2scm ("height-limit"), details);
- height_limit_ = robust_scm2double (scm_cdr (limit), 0.75) * staff_space_;
- ratio_ = robust_scm2double (scm_cdr (scm_assq (ly_symbol2scm ("ratio"), details)),
- .333);
- x_gap_ = robust_scm2double (me->get_property ("x-gap"), 0.2);
+ height_limit_ = robust_scm2double (ly_assoc_get (ly_symbol2scm ("height-limit"), details, SCM_EOL),
+ 0.75) * staff_space_;
+
+ ratio_ = robust_scm2double (ly_assoc_get (ly_symbol2scm ("ratio"), details, SCM_EOL),
+ .333);
+
+ x_gap_ = robust_scm2double (me->get_property ("x-gap"), 0.2);
+ between_length_limit_
+ = robust_scm2double (ly_assoc_get (ly_symbol2scm ("between-length-limit"), details, SCM_EOL),
+ 1.0);
+
}
Tie_details::Tie_details ()
Interval
Tie::get_default_attachments (Spanner *me, Grob *common, Real gap,
int *staff_position,
- bool *in_between
+ bool *in_between,
+ Tie_details const &details
)
{
Real staff_space = Staff_symbol_referencer::staff_space (me);
}
while (flip (&d) != LEFT);
- if (attachments.length () < 0.6 * staff_space)
+ if (attachments.length () < details.between_length_limit_ * staff_space)
{
/*
Let short ties start over note heads, instead of between.
conf->dir_ = get_grob_direction (me);
if (!conf->dir_)
conf->dir_ = get_default_dir (me);
-
Real staff_space = details.staff_space_;
bool in_between = true;
{
if (!skylines)
conf->attachment_x_ = get_default_attachments (me, common, gap,
- &conf->position_,
- &in_between);
+ &conf->position_,
+ &in_between, details);
else
{
Real y = staff_space * 0.5 * conf->position_;
if (conf->position_ == conf->head_position_
&& in_space
&& Staff_symbol_referencer::staff_radius (me) > abs (conf->position_) / 2
- && dy > 0.3 * staff_space)
+ && dy > 0.3 * staff_space
+ )
{
conf->position_ += 2 * conf->dir_;
}
ADD_INTERFACE (Tie,
"tie-interface",
- "A tie connecting two noteheads.\n",
+ "A tie connecting two noteheads. \n\n"
+ ,
+
/* properties */
"control-points "
}
-
-#(set-default-paper-size "a4")
+#(set-default-paper-size (ly:get-option 'paper-size))
partCombineListener = \layout {
%%
raggedlastbottom= ##t
- %% ugh. Should use /etc/papersize and set explicitly for
- %% documentation.
- papersizename = "a4"
-
#(define font-defaults
'((font-encoding . fetaMusic)))
(NewBassFigure
. (
(print-function . ,Text_interface::print)
- (font-size . -2)
(meta . ((class . Item)
(interfaces . (text-interface
rhythmic-grob-interface
font-interface))))))
(Tie
- . (
- (print-function . ,Tie::print)
- (details . ((ratio . 0.333) (height-limit . 1.0)))
+ . ((print-function . ,Tie::print)
+ (details . ((ratio . 0.333)
+ (height-limit . 1.0)
+ (between-length-limit . 1.0)))
(thickness . 1.0)
(meta . ((class . Spanner)
- (interfaces . (tie-interface))))))
+ (interfaces . (tie-interface))))
+ ))
(TieColumn
. (
(ly:add-option (car x) (cadr x) (caddr x)))
'((point-and-click #t "use point & click")
+ (paper-size "a4" "the default paper size")
(midi-debug #f "generate human readable MIDI")
(internal-type-checking #f "check every property assignment for types")
(parse-protect #t "continue when finding errors in inline
#:pad-x 0.2 alt-markup
)))
- (if (markup? fig-markup)
- fig-markup
+ (if (markup? fig-markup)
+ (markup #:fontsize -2 fig-markup)
empty-markup)))