@lilypond[quote,ragged-right,verbatim]
{
- \time 3/4
- \relative c' { c2 e4 g2 e4 }
- \addlyrics { gran -- de_a -- mi -- go }
- \addlyrics { pu -- "ro y ho" -- nes -- to }
- \addlyrics { pu -- ro~y~ho -- nes -- to }
+ \relative c'' { \autoBeamOff
+ r8 b c fis, fis c' b e, }
+ \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+ \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+ \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
}
@end lilypond
@lilypond[quote,ragged-right,verbatim]
{
- \time 3/4
- \relative c' { c2 e4 g2 e4 }
- \addlyrics { gran -- de_a -- mi -- go }
- \addlyrics { pu -- "ro y ho" -- nes -- to }
- \addlyrics { pu -- ro~y~ho -- nes -- to }
+ \relative c'' { \autoBeamOff
+ r8 b c fis, fis c' b e, }
+ \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+ \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+ \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
}
@end lilypond
@c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
@ignore
- Translation of GIT committish: d0c96d3f0b1dca7df98ef5586059965dd46ab16f
+ Translation of GIT committish: 3930746d3e6cab846a02332c39510c48027c6006
When revising a translation, copy the HEAD committish of the
version that you are working on. For details, see the Contributors'
les paroles.
@end itemize
-Si vous utilisez @ref{Le scrip Articulate}, d'autres éléments seront
+Si vous utilisez @ref{Le script Articulate}, d'autres éléments seront
alors inclus@tie{}:
@itemize
@c TODO index as above
LilyPond ne peut générer d'événement MIDI pour les éléments
-suivant, sauf à utiliser @ref{Le scrip Articulate}@tie{}:
+suivant, sauf à utiliser @ref{Le script Articulate}@tie{}:
@itemize
@item
@lilypond[quote,ragged-right,verbatim]
{
- \time 3/4
- \relative c' { c2 e4 g2 e4 }
- \addlyrics { gran -- de_a -- mi -- go }
- \addlyrics { pu -- "ro y ho" -- nes -- to }
- \addlyrics { pu -- ro~y~ho -- nes -- to }
+ \relative c'' { \autoBeamOff
+ r8 b c fis, fis c' b e, }
+ \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+ \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+ \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
}
@end lilypond
@lilypond[quote,ragged-right,verbatim]
{
- \time 3/4
- \relative c' { c2 e4 g2 e4 }
- \addlyrics { gran -- de_a -- mi -- go }
- \addlyrics { pu -- "ro y ho" -- nes -- to }
- \addlyrics { pu -- ro~y~ho -- nes -- to }
+ \relative c'' { \autoBeamOff
+ r8 b c fis, fis c' b e, }
+ \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+ \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+ \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
}
@end lilypond
@c used for news about the upcoming release; see CG 10.2
@newsItem
-@subsubheading LilyPond 2.15.12 released! @emph{September 17, 2011}
+@subsubheading Release candidate 2 of 2.16 - LilyPond 2.15.12 released! @emph{Aug 20, 2011}
-We are happy to announce the release of LilyPond 2.15.12. This
-release contains the usual number of bugfixes.
+LilyPond 2.15.12 is out; this is the second release candidate of
+the upcoming 2.16 stable release. All users are invited to
+experiment with this version. New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version. Please
-note that due to the possibility of a few Critical bugs, this is
-not the next release candidate.
+There are no known Critical issues with this release. If no
+Critical bugs are found, then the official 2.16.0 release will be
+on 27 Sep Aug 2011. If you discover any problems, please send us
+@ref{Bug reports}.
@newsEnd
@newsEnd
-@newsItem
-@subsubheading LilyPond 2.15.10 released! @emph{September 6, 2011}
-
-We are happy to announce the release of LilyPond 2.15.10. This
-release contains the usual number of bugfixes.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version. Please
-note that due to a few outstanding Critical bugs, this is not the
-next release candidate.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.15.9 released! @emph{August 30, 2011}
-
-We are happy to announce the release of LilyPond 2.15.9. This
-release contains the usual number of bugfixes, and also adds
-support for MacOS X 10.7.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version. Please
-note that due to a few outstanding Critical bugs, this is not the
-next release candidate.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading Release candidate 1 of 2.16 - LilyPond 2.15.8 released! @emph{Aug 01, 2011}
-
-LilyPond 2.15.8 is out; this is the first release candidate of
-the upcoming 2.16 stable release. All users are invited to
-experiment with this version. New features since 2.14.2 are
-listed in the @qq{Changes} manual on the website section about
-@ref{Development}.
-
-There are no known Critical issues with this release. If no
-Critical bugs are found, then the official 2.16.0 release will be
-on 08 Aug 2011. If you discover any problems, please send us
-@ref{Bug reports}.
-
-@newsEnd
-
-
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subsubheading LilyPond 2.15.10 released! @emph{September 6, 2011}
+
+We are happy to announce the release of LilyPond 2.15.10. This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version. Please
+note that due to a few outstanding Critical bugs, this is not the
+next release candidate.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.15.9 released! @emph{August 30, 2011}
+
+We are happy to announce the release of LilyPond 2.15.9. This
+release contains the usual number of bugfixes, and also adds
+support for MacOS X 10.7.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version. Please
+note that due to a few outstanding Critical bugs, this is not the
+next release candidate.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading Release candidate 1 of 2.16 - LilyPond 2.15.8 released! @emph{Aug 01, 2011}
+
+LilyPond 2.15.8 is out; this is the first release candidate of
+the upcoming 2.16 stable release. All users are invited to
+experiment with this version. New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
+
+There are no known Critical issues with this release. If no
+Critical bugs are found, then the official 2.16.0 release will be
+on 08 Aug 2011. If you discover any problems, please send us
+@ref{Bug reports}.
+
+@newsEnd
+
+
@newsItem
@subsubheading LilyPond 2.15.7 released! @emph{July 29, 2011}
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=15
-PATCH_LEVEL=12
+PATCH_LEVEL=13
MY_PATCH_LEVEL=
VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.11
+VERSION_DEVEL=2.15.12
--- /dev/null
+\version "2.15.11"
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+ texidoc = "Cyclic references in header fields should cause a warning, but
+not crash LilyPond with an endless loop"
+
+ title = \markup {Cyclic reference to \fromproperty #'header:title }
+
+ composer = \markup {Cyclic reference to \fromproperty #'header:temp }
+ temp = \markup {Cyclic reference to \fromproperty #'header:composer }
+}
+\score {
+ { c' d' e' f' }
+}
--- /dev/null
+\version "2.15.11"
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+ texidoc = "Cyclic markup definitions should cause a warning, but
+not crash LilyPond with an endless loop"
+}
+
+% A simple markup function that calls itself in a loop.
+#(define-markup-command (cycle layout props m)
+ (markup?)
+ (interpret-markup layout props (make-cycle-markup m)))
+
+% Two simple markup functions that call each other in a loop.
+#(define-markup-command (cycleI layout props m)
+ (markup?)
+ (interpret-markup layout props (make-cycleII-markup m)))
+#(define-markup-command (cycleII layout props m)
+ (markup?)
+ (interpret-markup layout props (make-cycleI-markup m)))
+
+
+\markup { \cycle "a" }
+\markup { \cycleI "a" }
--- /dev/null
+\version "2.15.12"
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+ texidoc = "Markups have a maximum depth to prevent non-termination."
+
+}
+
+% A simple markup function that calls itself and increases its argument, so
+% it will grow forever, unless we terminate it.
+#(define-markup-command (recursive-explosion layout props nr)
+ (number?)
+ (interpret-markup layout props (make-recursive-explosion-markup (+ nr 1))))
+
+\markup { Test: \recursive-explosion #1 }
SCM short_text_;
vector<Grob *> axis_groups_;
+ vector<Grob *> backup_axis_groups_;
virtual void finalize ();
DECLARE_ACKNOWLEDGER (axis_group);
{
if (dynamic_cast<Spanner *> (info.grob ())
&& Axis_group_interface::has_axis (info.grob (), Y_AXIS)
- && Page_layout_problem::is_spaceable (info.grob ())
/* ugh. */
&& !info.grob ()->internal_has_interface (ly_symbol2scm ("volta-interface"))
&& (!Align_interface::has_interface (info.grob ())))
{
- axis_groups_.push_back (info.grob ());
+ if (Page_layout_problem::is_spaceable (info.grob ()))
+ axis_groups_.push_back (info.grob ());
+ else
+ // By default, don't include non-spaceable staves in the
+ // support of an instrument name. However, if the only staves
+ // are non-spaceable, we'll fall back to using them.
+ backup_axis_groups_.push_back (info.grob ());
}
}
void
Instrument_name_engraver::stop_spanner ()
{
+ if (axis_groups_.empty ())
+ axis_groups_ = backup_axis_groups_;
+
for (vsize i = 0; i < axis_groups_.size (); i++)
Pointer_group_interface::add_grob (text_spanner_,
ly_symbol2scm ("elements"),
context ()->get_score_context ()->unset_property (ly_symbol2scm ("forbidBreak"));
first_ = false;
- break_events_.clear ();
label_events_.clear ();
SCM mpos = get_property ("measurePosition");
void
Paper_column_engraver::start_translation_timestep ()
{
+ break_events_.clear ();
if (!first_ && !to_boolean (get_property ("skipTypesetting")))
{
make_columns ();
deleting them. Let's hope that a stack overflow doesnt trigger a move
of the parse stack onto the heap. */
-%left PREC_TOP
-%left ADDLYRICS
%left PREC_BOT
+%nonassoc REPEAT
+%nonassoc ALTERNATIVE
+%left ADDLYRICS
+%left PREC_TOP
-%expect 1
-/* One shift/reduce problem
+/* The above precedences tackle the shift/reduce problem
1. \repeat
\repeat .. \alternative
/* Music */
%type <scm> composite_music
%type <scm> grouped_music_list
+%type <scm> braced_music_list
%type <scm> closed_music
-%type <scm> open_music
%type <scm> music
%type <scm> prefix_composite_music
%type <scm> repeated_music
%type <outputdef> output_def
%type <outputdef> paper_block
-%type <scm> alternative_music
%type <scm> generic_prefix_music_scm
%type <scm> music_list
%type <scm> absolute_pitch
%type <scm> context_prop_spec
%type <scm> direction_less_char
%type <scm> duration_length
-%type <scm> closed_embedded_scm
%type <scm> embedded_scm
+%type <scm> embedded_scm_bare
+%type <scm> embedded_scm_closed
+%type <scm> embedded_scm_chord_body
+%type <scm> embedded_scm_event
%type <scm> figure_list
%type <scm> figure_spec
%type <scm> fraction
%type <scm> full_markup
%type <scm> full_markup_list
-%type <scm> function_scm_argument
%type <scm> function_arglist
-%type <scm> function_arglist_nonmusic_last
-%type <scm> closed_function_arglist
-%type <scm> open_function_arglist
+%type <scm> function_arglist_bare
+%type <scm> function_arglist_closed
%type <scm> identifier_init
%type <scm> lilypond
%type <scm> lilypond_header
%type <scm> markup_composed_list
%type <scm> markup_command_list
%type <scm> markup_command_list_arguments
-%type <scm> closed_markup_command_list_arguments
%type <scm> markup_command_basic_arguments
%type <scm> markup_head_1_item
%type <scm> markup_head_1_list
%type <scm> property_operation
%type <scm> property_path property_path_revved
%type <scm> scalar
-%type <scm> closed_scalar
-%type <scm> open_scm_function_call
-%type <scm> closed_scm_function_call
+%type <scm> scalar_bare
+%type <scm> scalar_closed
+%type <scm> scm_function_call
+%type <scm> scm_function_call_closed
%type <scm> script_abbreviation
%type <scm> simple_chord_elements
%type <scm> simple_markup
}
;
-closed_embedded_scm:
+embedded_scm_bare:
SCM_TOKEN
| SCM_IDENTIFIER
- | closed_scm_function_call
;
-embedded_scm:
- closed_embedded_scm
- | open_scm_function_call
- ;
+/* The generic version may end in music, or not */
-closed_scm_function_call:
- SCM_FUNCTION closed_function_arglist
- {
- $$ = run_music_function (PARSER, @$,
- $1, $2);
- }
+embedded_scm:
+ embedded_scm_bare
+ | scm_function_call
;
-open_scm_function_call:
- SCM_FUNCTION open_function_arglist
- {
+scm_function_call:
+ SCM_FUNCTION function_arglist {
$$ = run_music_function (PARSER, @$,
$1, $2);
}
| book_body lilypond_header {
$$->header_ = $2;
}
+ | book_body embedded_scm { }
| book_body error {
$$->paper_ = 0;
$$->scores_ = SCM_EOL;
| bookpart_body lilypond_header {
$$->header_ = $2;
}
+ | bookpart_body embedded_scm { }
| bookpart_body error {
$$->paper_ = 0;
$$->scores_ = SCM_EOL;
TEMPO steno_duration '=' tempo_range {
$$ = MAKE_SYNTAX ("tempo", @$, SCM_EOL, $2, $4);
}
- | TEMPO closed_scalar steno_duration '=' tempo_range {
+ | TEMPO scalar_closed steno_duration '=' tempo_range {
$$ = MAKE_SYNTAX ("tempo", @$, $2, $3, $5);
}
- | TEMPO closed_scalar {
+ | TEMPO scalar {
$$ = MAKE_SYNTAX ("tempo", @$, $2);
}
;
}
;
+braced_music_list:
+ '{' music_list '}'
+ {
+ $$ = scm_reverse_x ($2, SCM_EOL);
+ }
+ ;
+
music:
simple_music
| composite_music
| MUSIC_IDENTIFIER
;
-alternative_music:
- /* empty */ {
- $$ = SCM_EOL;
- }
- | ALTERNATIVE '{' music_list '}' {
- $$ = scm_reverse_x ($3, SCM_EOL);
- }
- ;
-
repeated_music:
- REPEAT simple_string unsigned_number music alternative_music
+ REPEAT simple_string unsigned_number music
+ {
+ $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, SCM_EOL);
+ }
+ | REPEAT simple_string unsigned_number music ALTERNATIVE braced_music_list
{
- $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $5);
+ $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $6);
}
;
sequential_music:
- SEQUENTIAL '{' music_list '}' {
- $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($3, SCM_EOL));
+ SEQUENTIAL braced_music_list {
+ $$ = MAKE_SYNTAX ("sequential-music", @$, $2);
}
- | '{' music_list '}' {
- $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($2, SCM_EOL));
+ | braced_music_list {
+ $$ = MAKE_SYNTAX ("sequential-music", @$, $1);
}
;
simultaneous_music:
- SIMULTANEOUS '{' music_list '}'{
- $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($3, SCM_EOL));
+ SIMULTANEOUS braced_music_list {
+ $$ = MAKE_SYNTAX ("simultaneous-music", @$, $2);
}
| DOUBLE_ANGLE_OPEN music_list DOUBLE_ANGLE_CLOSE {
$$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($2, SCM_EOL));
| grouped_music_list
;
-/* Music that potentially accepts additional events or durations */
-open_music:
- simple_music
- | prefix_composite_music
- ;
-
grouped_music_list:
simultaneous_music { $$ = $1; }
| sequential_music { $$ = $1; }
;
-function_scm_argument:
- closed_embedded_scm
- | simple_string
- ;
-
/* An argument list. If a function \foo expects scm scm music, then the lexer expands \foo into the token sequence:
MUSIC_FUNCTION EXPECT_MUSIC EXPECT_SCM EXPECT_SCM EXPECT_NO_MORE_ARGS
and this rule returns the reversed list of arguments. */
function_arglist:
- closed_function_arglist
- | open_function_arglist
+ function_arglist_bare
+ | EXPECT_MUSIC function_arglist music {
+ $$ = scm_cons ($3, $2);
+ }
+ | EXPECT_SCM function_arglist embedded_scm {
+ $$ = scm_cons ($3, $2);
+ }
;
-open_function_arglist:
- EXPECT_MUSIC function_arglist open_music {
+function_arglist_closed:
+ function_arglist_bare
+ | EXPECT_MUSIC function_arglist closed_music {
$$ = scm_cons ($3, $2);
}
- | EXPECT_SCM function_arglist open_scm_function_call {
+ | EXPECT_SCM function_arglist embedded_scm_closed {
$$ = scm_cons ($3, $2);
}
;
-/* a closed argument list is one that does not end in a music
- expression that could still take a duration or event */
+embedded_scm_closed:
+ embedded_scm_bare
+ | scm_function_call_closed
+ ;
-closed_function_arglist:
- function_arglist_nonmusic_last
- | EXPECT_MUSIC function_arglist closed_music {
- $$ = scm_cons ($3, $2);
- }
+scm_function_call_closed:
+ SCM_FUNCTION function_arglist_closed {
+ $$ = run_music_function (PARSER, @$,
+ $1, $2);
+ }
;
-function_arglist_nonmusic_last:
+function_arglist_bare:
EXPECT_NO_MORE_ARGS {
/* This is for 0-ary functions, so they don't need to
read a lookahead token */
| EXPECT_PITCH function_arglist pitch_also_in_chords {
$$ = scm_cons ($3, $2);
}
- | EXPECT_DURATION closed_function_arglist duration_length {
+ | EXPECT_DURATION function_arglist_closed duration_length {
$$ = scm_cons ($3, $2);
}
- | EXPECT_SCM function_arglist function_scm_argument {
- $$ = scm_cons ($3, $2);
+ | EXPECT_SCM function_arglist simple_string {
+ $$ = scm_cons ($3, $2);
}
;
property_path_revved:
- closed_embedded_scm {
+ embedded_scm_closed {
$$ = scm_cons ($1, SCM_EOL);
}
- | property_path_revved closed_embedded_scm {
+ | property_path_revved embedded_scm_closed {
$$ = scm_cons ($2, $1);
}
;
}
;
-closed_scalar: string {
+scalar_bare:
+ string {
$$ = $1;
}
| lyric_element {
| bare_number {
$$ = $1;
}
- | closed_embedded_scm {
+ | embedded_scm_bare {
$$ = $1;
}
| full_markup {
}
;
-scalar: closed_scalar
- | open_scm_function_call
+scalar:
+ scalar_bare |
+ scm_function_call
;
+scalar_closed:
+ scalar_bare |
+ scm_function_call_closed
+ ;
+
+
event_chord:
/* TODO: Create a special case that avoids the creation of
EventChords around simple_elements that have no post_events?
*/
music_function_chord_body_arglist:
- function_arglist_nonmusic_last
+ function_arglist_bare
| EXPECT_MUSIC music_function_chord_body_arglist chord_body_element {
$$ = scm_cons ($3, $2);
}
+ | EXPECT_SCM function_arglist embedded_scm_chord_body {
+ $$ = scm_cons ($3, $2);
+ }
+ ;
+
+embedded_scm_chord_body:
+ embedded_scm_bare
+ | SCM_FUNCTION music_function_chord_body_arglist {
+ $$ = run_music_function (PARSER, @$,
+ $1, $2);
+ }
;
music_function_chord_body:
* refrain from doing so.
*/
music_function_event_arglist:
- function_arglist_nonmusic_last
+ function_arglist_bare
| EXPECT_MUSIC music_function_event_arglist post_event {
$$ = scm_cons ($3, $2);
}
+ | EXPECT_SCM function_arglist embedded_scm_event {
+ $$ = scm_cons ($3, $2);
+ }
+ ;
+
+embedded_scm_event:
+ embedded_scm_bare
+ | SCM_FUNCTION music_function_event_arglist {
+ $$ = run_music_function (PARSER, @$,
+ $1, $2);
+ }
;
music_function_event:
;
markup_command_list:
- MARKUP_LIST_FUNCTION closed_markup_command_list_arguments {
+ MARKUP_LIST_FUNCTION markup_command_list_arguments {
$$ = scm_cons ($1, scm_reverse_x($2, SCM_EOL));
}
;
EXPECT_MARKUP_LIST markup_command_list_arguments markup_list {
$$ = scm_cons ($3, $2);
}
- | EXPECT_SCM markup_command_list_arguments closed_embedded_scm {
+ | EXPECT_SCM markup_command_list_arguments embedded_scm_closed {
$$ = scm_cons ($3, $2);
}
| EXPECT_NO_MORE_ARGS {
}
;
-closed_markup_command_list_arguments:
+markup_command_list_arguments:
markup_command_basic_arguments { $$ = $1; }
| EXPECT_MARKUP markup_command_list_arguments markup {
$$ = scm_cons ($3, $2);
}
;
-markup_command_list_arguments:
- closed_markup_command_list_arguments
- | EXPECT_SCM markup_command_list_arguments open_scm_function_call
- {
- $$ = scm_cons ($3, $2);
- }
- ;
-
markup_head_1_item:
MARKUP_FUNCTION EXPECT_MARKUP markup_command_list_arguments {
$$ = scm_cons ($1, scm_reverse_x ($3, SCM_EOL));
Also, not for knees. Seems to be a good thing. */
bool no_extend = to_boolean (me->get_property ("no-stem-extend"));
- bool is_knee = to_boolean (beam->get_property ("knee"));
+ bool is_knee = Beam::is_knee (beam);
if (!no_extend && !is_knee)
{
/* Highest beam of (UP) beam must never be lower than middle
#include "modified-font-metric.hh"
#include "output-def.hh"
#include "pango-font.hh"
+#include "program-option.hh"
#include "international.hh"
#include "warn.hh"
if (!is_markup (markup))
programming_error ("markup head has no markup signature");
- return scm_apply_2 (func, layout_smob, props, args);
+ /* Use a hare/tortoise algorithm to detect whether we are in a cycle,
+ * i.e. whether we have already encountered the same markup in the
+ * current branch of the markup tree structure. */
+ static vector<SCM> encountered_markups;
+ size_t depth = encountered_markups.size ();
+ if (depth > 0)
+ {
+ int slow = depth / 2;
+ if (ly_is_equal (encountered_markups[slow], markup))
+ {
+ string name = ly_symbol2string (scm_procedure_name (func));
+ // TODO: Also print the arguments of the markup!
+ non_fatal_error (_f("Cyclic markup detected: %s", name));
+ return Stencil().smobbed_copy ();
+ }
+ }
+
+ /* Check for non-terminating markups, e.g. recursive calls with
+ * changing arguments */
+ SCM opt_depth = ly_get_option (ly_symbol2scm ("max-markup-depth"));
+ size_t max_depth = robust_scm2int(opt_depth, 1024);
+ if (depth > max_depth)
+ {
+ string name = ly_symbol2string (scm_procedure_name (func));
+ // TODO: Also print the arguments of the markup!
+ non_fatal_error (_f("Markup depth exceeds maximal value of %d; "
+ "Markup: %s", max_depth, name.c_str ()));
+ return Stencil().smobbed_copy ();
+ }
+
+ encountered_markups.push_back (markup);
+ SCM retval = scm_apply_2 (func, layout_smob, props, args);
+ encountered_markups.pop_back ();
+ return retval;
}
else
{
# FIXME: duplicated in stepake/texinfo-vars.make make/doc-i18n-root-vars.make
XREF_MAPS_DIR=$(top-build-dir)/$(outdir)/xref-maps
XREF_MAPS_FILES=$(TEXINFO_MANUALS:%=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
-XREF_MAP_FLAGS += -I $(outdir) -I$(src-dir)
+XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir) $(DOCUMENTATION_INCLUDES)
WEB_MANUALS=web
fet_begingroup ("ties");
-fet_beginchar ("lyric tie", "lyric");
- save padding;
+save min_width, max_width, min_height, max_height, thin, thick;
- padding := .4 staff_space;
+min_width:= .5 staff_space#;
+max_width:= 5 staff_space#;
+min_height := .2 staff_space#;
+max_height := .4 staff_space#;
+thin := 1.2 linethickness;
+thick := 2 linethickness;
+
+def draw_lyric_tie (expr width_sharp) =
+ save padding, angularity, width, height, depth;
+
+ padding# := .4 staff_space#;
+ angularity := 2.5;
+ width# := max (min (width_sharp, max_width), min_width);
+ height# := (max (width# - min_width, 0) / (max_width - min_width))
+ [min_height, max_height];
+ depth# := padding# + height#;
set_char_box (0, 0,
- .7 staff_space#, 0);
+ depth#, 0);
+
+ define_pixels (width, padding);
- z1 = (-staff_space, -padding);
+ z1 = (-width / 2, -padding);
z2 = (0, -d);
- z3 = (staff_space, -padding);
+ z3 = (width / 2, -padding);
- penpos1 (1.2 linethickness, 50);
- penpos2 (2 linethickness, 90);
- penpos3 (1.2 linethickness, 130);
+ penpos1 (thin, angularity * angle (z2 - z1) + 90);
+ penpos2 (thick, 90);
+ penpos3 (thin, angularity * angle (z3 - z2) + 90);
fill z2l
.. simple_serif (z3l, z3r, 90)
.. cycle;
penlabels (1, 2, 3);
+enddef;
+
+fet_beginchar ("Short lyric tie", "lyric.short");
+ draw_lyric_tie (1.25 staff_space#);
+fet_endchar;
+
+fet_beginchar ("Default lyric tie", "lyric.default");
+ draw_lyric_tie (1.75 staff_space#);
fet_endchar;
fet_endgroup ("ties");
def draw_neomensural_black_head (expr wid, height) =
- save head_height, head_width, stem_width,
- ne, nw, ne_dist, nw_dist, penthickness;
+ save head_height, head_width, stem_width;
+ save ne, nw, ne_dist, nw_dist, penthickness;
pair ne, nw, ne_dist, nw_dist;
penthickness# = linethickness#;
% (ze is wel breed)
%
-save nm_maxima_width, nm_longa_width, nm_brevis_width,
- nm_holeheight, nm_red_holeheight;
+save nm_maxima_width, nm_longa_width, nm_brevis_width;
+save nm_holeheight, nm_red_holeheight;
+
nm_maxima_width := 2.6 staff_space#;
nm_longa_width := 2 staff_space#;
nm_brevis_width := nm_longa_width;
(let ((status (apply ly:spawn command)))
(if (> status 0)
(begin
- (ly:message (_ "`~a' failed (~a)") command status)
- (ly:progress "\n")
+ (ly:warning (_ "`~a' failed (~a)\n") command status)
;; hmmm. what's the best failure option?
(throw 'ly-file-failed)))))
"-c.setpdfwrite"
(string-append "-f" name)))))
- (ly:message (_ "Converting to `~a'...") pdf-name)
- (ly:progress "\n")
+ (ly:message (_ "Converting to `~a'...\n") pdf-name)
(ly:system cmd)))
(define-public (postscript->png resolution paper-width paper-height name)
Like simple-markup, but use tie characters for @q{~} tilde symbols.
@lilypond[verbatim,quote]
-\\markup {
- \\tied-lyric #\"Lasciate~i monti\"
-}
-@end lilypond"
- (if (string-contains str "~")
- (let*
- ((half-space (/ word-space 2))
- (parts (string-split str #\~))
- (tie-str (markup #:hspace half-space
- #:musicglyph "ties.lyric"
- #:hspace half-space))
- (joined (list-join parts tie-str))
- (join-stencil (interpret-markup layout props tie-str))
- )
+\\markup \\column {
+ \\tied-lyric #\"Siam navi~all'onde~algenti Lasciate~in abbandono\"
+ \\tied-lyric #\"Impetuosi venti I nostri~affetti sono\"
+ \\tied-lyric #\"Ogni diletto~e scoglio Tutta la vita~e~un mar.\"
+}
+@end lilypond"
+ (define (replace-ties tie str)
+ (if (string-contains str "~")
+ (let*
+ ((half-space (/ word-space 2))
+ (parts (string-split str #\~))
+ (tie-str (markup #:hspace half-space
+ #:musicglyph tie
+ #:hspace half-space))
+ (joined (list-join parts tie-str)))
+ (make-concat-markup joined))
+ str))
+
+ (define short-tie-regexp (make-regexp "~[^.]~"))
+ (define (match-short str) (regexp-exec short-tie-regexp str))
+
+ (define (replace-short str mkp)
+ (let ((match (match-short str)))
+ (if (not match)
+ (make-concat-markup (list
+ mkp
+ (replace-ties "ties.lyric.default" str)))
+ (let ((new-str (match:suffix match))
+ (new-mkp (make-concat-markup (list
+ mkp
+ (replace-ties "ties.lyric.default"
+ (match:prefix match))
+ (replace-ties "ties.lyric.short"
+ (match:substring match))))))
+ (replace-short new-str new-mkp)))))
- (interpret-markup layout
- props
- (make-concat-markup joined)))
- (interpret-markup layout props str)))
+ (interpret-markup layout
+ props
+ (replace-short str (markup))))
(define-public empty-markup
(make-simple-markup ""))
;; property
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define-markup-command (property-recursive layout props symbol)
+ (symbol?)
+ #:category other
+ "Print out a warning when a header field markup contains some recursive
+markup definition."
+ (ly:warning "Recursive definition of property ~a detected!" symbol)
+ empty-stencil)
+
(define-markup-command (fromproperty layout props symbol)
(symbol?)
#:category other
@end lilypond"
(let ((m (chain-assoc-get symbol props)))
(if (markup? m)
- (interpret-markup layout props m)
+ ;; prevent infinite loops by clearing the interpreted property:
+ (interpret-markup layout (cons (list (cons symbol `(,property-recursive-markup ,symbol))) props) m)
empty-stencil)))
(define-markup-command (on-the-fly layout props procedure arg)
- (symbol? markup?)
+ (procedure? markup?)
#:category other
"Apply the @var{procedure} markup command to @var{arg}.
@var{procedure} should take a single argument."
(log-file #f
"If string FOO is given as argument, redirect
output to log file `FOO.log'.")
+ (max-markup-depth 1024
+"Maximum depth for the markup tree. If a markup has more levels,
+assume it will not terminate on its own, print a warning and return a
+null markup instead.")
(midi-extension ,(if (eq? PLATFORM 'windows)
"mid"
"midi")
(define (helper pred? arg count)
(if (not (pred? arg))
(begin
- (ly:input-message
+ (ly:input-warning
location
- (format
- #f (_ "wrong type for argument ~a. Expecting ~a, found ~s")
- count (type-name pred?) arg))
+ (_ "wrong type for argument ~a. Expecting ~a, found ~s")
+ count (type-name pred?) arg)
#f)
#t))
'grob-property gprop))
(define direction-polyphonic-grobs
- '(DotColumn
+ '(AccidentalSuggestion
+ DotColumn
Dots
Fingering
LaissezVibrerTie
+ LigatureBracket
PhrasingSlur
RepeatTie
Rest
Stem
TextScript
Tie
- TupletBracket))
+ TupletBracket
+ TrillSpanner))
(define-safe-public (make-voice-props-set n)
(make-sequential-music
;; copy of ly:system. ly:* not available via lilypond-ps2png.scm
(define (my-system be-verbose exit-on-error cmd)
(define status 0)
- (if be-verbose
- (begin
- (format (current-error-port) (_ "Invoking `~a'...") cmd)
- (newline (current-error-port))))
+ (ly:debug (_ "Invoking `~a'...\n") cmd)
(set! status (system cmd))
(if (not (= status 0))
(begin
- (format (current-error-port)
- (format #f (_ "~a exited with status: ~S") "GS" status))
+ (ly:error (_ "~a exited with status: ~S") "GS" status)
(if exit-on-error (exit 1))))
status)
XREF_MAPS_DIR = $(top-build-dir)/$(outdir)/xref-maps
XREF_MAPS_FILES += $(TEXI_FILES:%.texi=$(XREF_MAPS_DIR)/%.xref-map) \
$(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.xref-map)
-XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir)
+XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir) $(DOCUMENTATION_INCLUDES)
###########
ifneq ($(ISOLANG),)