diff options
author | Andrew Hawryluk <ahawryluk@gmail.com> | 2011-01-15 13:42:03 -0700 |
---|---|---|
committer | Graham Percival <graham@percival-music.ca> | 2011-03-01 09:05:17 +0000 |
commit | 53db923e715126eb9463220526b4838fbfd3dad4 (patch) | |
tree | 11c42e2bfa5ab99357f7a73edbcedd6f7b268ad9 | |
parent | 6255791221fd8197a23d3299fdad85a3a79336ab (diff) |
Change keep-inside-line defaults to true.
As discussed in Issue #1470, the default should be changed so that
good layout with a slight performance hit is the default.
28 files changed, 212 insertions, 245 deletions
diff --git a/Documentation/learning/tweaks.itely b/Documentation/learning/tweaks.itely index 844399d7f6..99cfcf645f 100644 --- a/Documentation/learning/tweaks.itely +++ b/Documentation/learning/tweaks.itely @@ -3422,7 +3422,6 @@ lhMusic = \relative c' { * Using variables for tweaks:: * Style sheets:: * Other sources of information:: -* Avoiding tweaks with slower processing:: * Advanced tweaks with Scheme:: @end menu @@ -4106,40 +4105,6 @@ interest are: @end multitable - -@node Avoiding tweaks with slower processing -@subsection Avoiding tweaks with slower processing - -LilyPond can perform extra checks while it processes input files. -These checks will take extra time to perform, but fewer manual tweaks -may be required to obtain an acceptable result. If a text script -or part of the lyrics extends over the margins these checks will -compress that line of the score just enough to fit within the -margins. - -To be effective under all circumstances these checks must be enabled -by placing the overrides using @code{\context} within a @code{\layout} -block, rather than in-line in music, as follows: - -@example -\score @{ - @{ @dots{}notes@dots{} @} - \layout @{ - \context @{ - \Score - % Makes sure text scripts and lyrics are within the paper margins - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - @} - @} -@} -@end example - -However, @code{keep-inside-line} is expensive and the recommendation -is to not enable it, to allow for faster processing, until creating -a final version. This way you do not need to manually add @code{\break} -commands to avoid text running off the right-hand side of the page. - @node Advanced tweaks with Scheme @subsection Advanced tweaks with Scheme diff --git a/Documentation/notation/text.itely b/Documentation/notation/text.itely index 6841e44dcb..406f6be96d 100644 --- a/Documentation/notation/text.itely +++ b/Documentation/notation/text.itely @@ -123,12 +123,11 @@ Internals Reference: @knownissues Checking to make sure that text scripts and lyrics are within the -margins is a relatively large computational task. To speed up -processing, LilyPond does not perform such calculations by -default; to enable it, use +margins requires additonal calculations. In cases where slightly faster +performance is desired, use @example -\override Score.PaperColumn #'keep-inside-line = ##t +\override Score.PaperColumn #'keep-inside-line = ##f @end example diff --git a/Documentation/notation/vocal.itely b/Documentation/notation/vocal.itely index 47d60222a9..e63729bb0f 100644 --- a/Documentation/notation/vocal.itely +++ b/Documentation/notation/vocal.itely @@ -1158,12 +1158,12 @@ To make this change for all lyrics in the score, set the property in the @c TODO: move to LSR -vv -Checking to make sure that text scripts and lyrics are within the -margins is a relatively large computational task. To speed up processing, -LilyPond does not perform such calculations by default; to enable it, use +Checking to make sure that text scripts and lyrics are within the margins +required additional calculations. To speed up processing slighty, this +feature can be disabled: @example -\override Score.PaperColumn #'keep-inside-line = ##t +\override Score.PaperColumn #'keep-inside-line = ##f @end example To make lyrics avoid bar lines as well, use diff --git a/Documentation/snippets/new/ancient-headword.ly b/Documentation/snippets/new/ancient-headword.ly index f7568d728b..50a8ba81d5 100644 --- a/Documentation/snippets/new/ancient-headword.ly +++ b/Documentation/snippets/new/ancient-headword.ly @@ -14,14 +14,6 @@ doctitle = "headword" } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - \include "gregorian.ly" \score { diff --git a/Documentation/snippets/new/chords-headword.ly b/Documentation/snippets/new/chords-headword.ly index 5963f0fd88..d267d561b7 100644 --- a/Documentation/snippets/new/chords-headword.ly +++ b/Documentation/snippets/new/chords-headword.ly @@ -13,14 +13,6 @@ } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - theChords = \chordmode { \time 2/2 f1 | c2 f2 | f1 | c2 f2| %\break diff --git a/Documentation/snippets/new/editorial-headword.ly b/Documentation/snippets/new/editorial-headword.ly index 626605f7a5..6ae939e0fd 100644 --- a/Documentation/snippets/new/editorial-headword.ly +++ b/Documentation/snippets/new/editorial-headword.ly @@ -14,14 +14,6 @@ doctitle = "headword" } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - % NR 1.7 Editorial annotations % Beethoven, Op. 31, No. 3 diff --git a/Documentation/snippets/new/figured-bass-headword.ly b/Documentation/snippets/new/figured-bass-headword.ly index ad04108e81..469e72fad5 100644 --- a/Documentation/snippets/new/figured-bass-headword.ly +++ b/Documentation/snippets/new/figured-bass-headword.ly @@ -6,14 +6,6 @@ indent = 1.5\cm } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - % NR 2.7.3 Figured bass diff --git a/Documentation/snippets/new/fretted-headword.ly b/Documentation/snippets/new/fretted-headword.ly index 32fafd0700..3b221cb0ac 100644 --- a/Documentation/snippets/new/fretted-headword.ly +++ b/Documentation/snippets/new/fretted-headword.ly @@ -22,8 +22,6 @@ \context { \Score \remove "Bar_number_engraver" - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t } } diff --git a/Documentation/snippets/new/pitches-headword.ly b/Documentation/snippets/new/pitches-headword.ly index 8cc3eca895..9c78f065d0 100644 --- a/Documentation/snippets/new/pitches-headword.ly +++ b/Documentation/snippets/new/pitches-headword.ly @@ -7,14 +7,6 @@ indent = 0\cm } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - % NR 1.1 Pitches \header { diff --git a/Documentation/snippets/new/simultaneous-headword.ly b/Documentation/snippets/new/simultaneous-headword.ly index 09ffbe04f0..caff63a477 100644 --- a/Documentation/snippets/new/simultaneous-headword.ly +++ b/Documentation/snippets/new/simultaneous-headword.ly @@ -7,15 +7,6 @@ indent = 0\cm } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - - \header { lsrtags = "headwords" texidoc = "" diff --git a/Documentation/snippets/new/text-headword.ly b/Documentation/snippets/new/text-headword.ly index 58a410f37e..10931fc9d7 100644 --- a/Documentation/snippets/new/text-headword.ly +++ b/Documentation/snippets/new/text-headword.ly @@ -13,14 +13,6 @@ doctitle = "headword" } -\layout { - \context { - \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - % NR 1.8 Text % L. v. Beethoven, Op. 110 diff --git a/Documentation/web/ly-examples/example-header.ily b/Documentation/web/ly-examples/example-header.ily index 0817b74683..ab35243579 100644 --- a/Documentation/web/ly-examples/example-header.ily +++ b/Documentation/web/ly-examples/example-header.ily @@ -10,11 +10,3 @@ scoreTitleMarkup = ##f } -\layout { - \context { \Score - \override PaperColumn #'keep-inside-line = ##t - \override NonMusicalPaperColumn #'keep-inside-line = ##t - } -} - - diff --git a/input/regression/balloon.ly b/input/regression/balloon.ly index a60f89e57c..3a85fed660 100644 --- a/input/regression/balloon.ly +++ b/input/regression/balloon.ly @@ -9,10 +9,19 @@ with lines and explanatory text added." \layout{ ragged-right = ##t } -\new Voice \with {\consists "Balloon_engraver" } -{ - \relative c' { - \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } - <c-\balloonText #'(-2 . -2) \markup { \simple #"hoi" } >8 +\score{ + \new Voice \with {\consists "Balloon_engraver" } + { + \relative c' { + \balloonGrobText #'Stem #'(3 . 4) \markup { "I'm a Stem" } + <c-\balloonText #'(-2 . -2) \markup { \simple #"hoi" } >8 + } + } + + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f + } } } diff --git a/input/regression/font-bogus-ligature.ly b/input/regression/font-bogus-ligature.ly index b5abe6ccb5..1e46da7a0f 100644 --- a/input/regression/font-bogus-ligature.ly +++ b/input/regression/font-bogus-ligature.ly @@ -11,6 +11,15 @@ This may happen with incorrect font versions. ragged-right = ##T } -{ - c4^"November WHITMAN" +\score{ + { + c4^"November WHITMAN" + } + + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f + } + } } diff --git a/input/regression/font-family-override.ly b/input/regression/font-family-override.ly index 553747d478..45629a273e 100644 --- a/input/regression/font-family-override.ly +++ b/input/regression/font-family-override.ly @@ -34,19 +34,29 @@ (/ myStaffSize 20))) } -\relative c'' { - - c^\markup { roman: foo \bold bla \italic bar \italic \bold baz } - c'_\markup { - \override #'(font-family . sans) - { - sans: foo \bold bla \italic bar \italic \bold baz +\score { + \relative c'' { + + c^\markup { roman: foo \bold bla \italic bar \italic \bold baz } + c'_\markup { + \override #'(font-family . sans) + { + sans: foo \bold bla \italic bar \italic \bold baz + } + } + c'^\markup { + \override #'(font-family . typewriter) + { + mono: foo \bold bla \italic bar \italic \bold baz + } } } - c'^\markup { - \override #'(font-family . typewriter) - { - mono: foo \bold bla \italic bar \italic \bold baz + + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f } } + } diff --git a/input/regression/font-name.ly b/input/regression/font-name.ly index 062f2f7549..2e5eabfc4e 100644 --- a/input/regression/font-name.ly +++ b/input/regression/font-name.ly @@ -13,6 +13,7 @@ without size specification." { + \override Score.PaperColumn #'keep-inside-line = ##f \override Staff.TimeSignature #'font-name = #"Times New Roman" \time 3/4 \set Score.skipBars = ##t diff --git a/input/regression/hairpin-ending.ly b/input/regression/hairpin-ending.ly index a5e33c426c..92648d2d4b 100644 --- a/input/regression/hairpin-ending.ly +++ b/input/regression/hairpin-ending.ly @@ -12,6 +12,7 @@ into them." \layout { ragged-right = ##t } \relative c'' { + \override Score.PaperColumn #'keep-inside-line = ##f c4 \> c4 c4\! c4_\ff \> c4 c4\!\p << diff --git a/input/regression/harp-pedals-sanity-checks.ly b/input/regression/harp-pedals-sanity-checks.ly index c918ddbe6f..60ba821774 100644 --- a/input/regression/harp-pedals-sanity-checks.ly +++ b/input/regression/harp-pedals-sanity-checks.ly @@ -9,6 +9,7 @@ a warning is printed out, but they should still look okay." } \relative c'' { + \override Score.PaperColumn #'keep-inside-line = ##f % Sanity checks: #pedals != 7: c1^\markup \harp-pedal #"^-v|--" % Sanity checks: no divider, multiple dividers, divider on wrong position: diff --git a/input/regression/harp-pedals-tweaking.ly b/input/regression/harp-pedals-tweaking.ly index ad3f95552a..8b64e78063 100644 --- a/input/regression/harp-pedals-tweaking.ly +++ b/input/regression/harp-pedals-tweaking.ly @@ -6,6 +6,7 @@ harp-pedal-details properties of TextScript." } \relative c'' { + \override Score.PaperColumn #'keep-inside-line = ##f \override Voice.TextScript #'(harp-pedal-details box-width) = #1 \once \override Voice.TextScript #'size = #1.5 \once \override Voice.TextScript #'thickness = #7 diff --git a/input/regression/lyric-extender-right-margin.ly b/input/regression/lyric-extender-right-margin.ly index 0317b53493..9d76be3b3c 100644 --- a/input/regression/lyric-extender-right-margin.ly +++ b/input/regression/lyric-extender-right-margin.ly @@ -6,7 +6,6 @@ \score{ { \relative c' { - \override Score.PaperColumn #'keep-inside-line = ##t c4 d e f ~ | \break f4 e d c | } @@ -16,4 +15,4 @@ e d c } } -}
\ No newline at end of file +} diff --git a/input/regression/lyrics-no-notes.ly b/input/regression/lyrics-no-notes.ly index 3c6ef07e79..69e8d9c00c 100644 --- a/input/regression/lyrics-no-notes.ly +++ b/input/regression/lyrics-no-notes.ly @@ -8,6 +8,7 @@ paper column is very wide." \version "2.12.0" << + \override Score.PaperColumn #'keep-inside-line = ##f \new Staff \relative c' { \key aes \major \context Voice = "1" { diff --git a/input/regression/markup-commands.ly b/input/regression/markup-commands.ly index 688cd2e6a6..b8f947d84e 100644 --- a/input/regression/markup-commands.ly +++ b/input/regression/markup-commands.ly @@ -7,31 +7,40 @@ \paper { ragged-right = ##T } \version "2.12.0" -{ - g'_\markup { - \column { - \line { - foo \magnify #2 foo - LOWER \lower #3 LOWER - \large \bold { normal \normal-text normal } - Small-Caps \smallCaps Small-Caps - } - - \override #'(line-width . 50) - \override #'(bla . "This is a field containing text. Blah blah -blah. This is a field containing text. Blah blah blah. This is a -field containing text. Blah blah blah. This is a field containing -text. Blah blah blah. This is a field containing text. Blah blah -blah.") - \column { - justify: - \justify-field #'bla - wordwrap: - \wordwrap-field #'bla +\score{ + { + g'_\markup { + \column { + \line { + foo \magnify #2 foo + LOWER \lower #3 LOWER + \large \bold { normal \normal-text normal } + Small-Caps \smallCaps Small-Caps + } + + \override #'(line-width . 50) + \override #'(bla . "This is a field containing text. Blah blah + blah. This is a field containing text. Blah blah blah. This is a + field containing text. Blah blah blah. This is a field containing + text. Blah blah blah. This is a field containing text. Blah blah + blah.") + \column { + justify: + \justify-field #'bla + wordwrap: + \wordwrap-field #'bla + } + + draw-line: \draw-line #'(5 . 3) + \underline "underlined" } + } + } - draw-line: \draw-line #'(5 . 3) - \underline "underlined" + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f } } } diff --git a/input/regression/markup-note.ly b/input/regression/markup-note.ly index 0cdc526b35..1cda8b33e1 100644 --- a/input/regression/markup-note.ly +++ b/input/regression/markup-note.ly @@ -5,52 +5,62 @@ } \version "2.12.0" -\relative c'' -{ - c4^\markup { - \note #"1" #1 - \note #"2" #1 - \note #"4" #1 - \note #"8" #1 - \note #"16" #1 - \note #"32" #1 - \note #"64" #1 - - \note #"1" #-1 - \note #"2" #-1 - \note #"4" #-1 - \note #"8" #-1 - \note #"16" #-1 - \note #"32" #-1 - \note #"64" #-1 - - \note #"1." #-1 - \note #"2." #-1 - \note #"4." #-1 - \note #"8." #-1 - \note #"16." #-1 - \note #"32." #-1 - \note #"64." #-1 - - \note #"1." #1 - \note #"2." #1 - \note #"4." #1 - \note #"8." #1 - \note #"16." #1 - \note #"32." #1 - \note #"64." #1 - - \override #'(style . cross) - { \note-by-number #2 #1 #1 - \note-by-number #2 #1 #-1 - } - \override #'(style . triangle) - { \note-by-number #2 #1 #1 - \note-by-number #2 #1 #-1 +\score { + \relative c'' + { + c4^\markup { + \note #"1" #1 + \note #"2" #1 + \note #"4" #1 + \note #"8" #1 + \note #"16" #1 + \note #"32" #1 + \note #"64" #1 + + \note #"1" #-1 + \note #"2" #-1 + \note #"4" #-1 + \note #"8" #-1 + \note #"16" #-1 + \note #"32" #-1 + \note #"64" #-1 + + \note #"1." #-1 + \note #"2." #-1 + \note #"4." #-1 + \note #"8." #-1 + \note #"16." #-1 + \note #"32." #-1 + \note #"64." #-1 + + \note #"1." #1 + \note #"2." #1 + \note #"4." #1 + \note #"8." #1 + \note #"16." #1 + \note #"32." #1 + \note #"64." #1 + + \override #'(style . cross) + { \note-by-number #2 #1 #1 + \note-by-number #2 #1 #-1 + } + \override #'(style . triangle) + { \note-by-number #2 #1 #1 + \note-by-number #2 #1 #-1 + } + } + \override NoteHead #'style = #'triangle + c4 a } - \override NoteHead #'style = #'triangle - c4 a -} + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f + } + } + +} diff --git a/input/regression/markup-syntax.ly b/input/regression/markup-syntax.ly index 8a59a454b6..73b9cff77f 100644 --- a/input/regression/markup-syntax.ly +++ b/input/regression/markup-syntax.ly @@ -4,48 +4,58 @@ texidoc = "Demo of markup texts, using LilyPond syntax." } -{ - f'1-\markup { - foo - \raise #0.2 \hbracket \bold bar +\score { + { + f'1-\markup { + foo + \raise #0.2 \hbracket \bold bar - \override #'(baseline-skip . 4) - \bracket \column { - baz - bazr - bla + \override #'(baseline-skip . 4) + \bracket \column { + baz + bazr + bla + } + \hspace #2.0 + \override #'(font-encoding . fetaMusic) { + \lookup #"noteheads-0" + } + \semiflat + { } + \combine "X" "+" + \combine "o" "/" } - \hspace #2.0 - \override #'(font-encoding . fetaMusic) { - \lookup #"noteheads-0" + g'1-\markup { + % \char-number #"abc1234abc" + \box \column { + \line { "string 1" } + \line { "string 2" } + \concat { "f" "i" } + } + " " + \draw-circle #1 #0.3 ##f + " " + \draw-circle #1 #0.3 ##t + " " + \italic Norsk + \super "2" + " " + \raise #3.0 \whiteout white-out + \circle \dynamic p + \with-color #green Green + \dynamic sfzp + \huge { "A" \smaller "A" \smaller \smaller "A" + \smaller \smaller \smaller "A" } + \sub "alike" } - \semiflat - { } - \combine "X" "+" - \combine "o" "/" + c''4 } - g'1-\markup { - % \char-number #"abc1234abc" - \box \column { - \line { "string 1" } - \line { "string 2" } - \concat { "f" "i" } + + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f } - " " - \draw-circle #1 #0.3 ##f - " " - \draw-circle #1 #0.3 ##t - " " - \italic Norsk - \super "2" - " " - \raise #3.0 \whiteout white-out - \circle \dynamic p - \with-color #green Green - \dynamic sfzp - \huge { "A" \smaller "A" \smaller \smaller "A" - \smaller \smaller \smaller "A" } - \sub "alike" - } - c''4 + } + } diff --git a/input/regression/markup-user.ly b/input/regression/markup-user.ly index 6377347060..63b1450af0 100644 --- a/input/regression/markup-user.ly +++ b/input/regression/markup-user.ly @@ -15,10 +15,17 @@ the @code{define-markup-command} scheme macro." "Upcase the string characters. Syntax: \\upcase #\"string\"" (interpret-markup paper props (make-simple-markup (string-upcase str)))) - -{ - c''-\markup \upcase #"hello world" +\score{ + { + c''-\markup \upcase #"hello world" % produces a "HELLO WORLD" markup -} + } + \layout { + \context { + \Score + \override PaperColumn #'keep-inside-line = ##f + } + } +} diff --git a/input/regression/skyline-vertical-placement.ly b/input/regression/skyline-vertical-placement.ly index 731db4f2c5..b01a8a33d1 100644 --- a/input/regression/skyline-vertical-placement.ly +++ b/input/regression/skyline-vertical-placement.ly @@ -7,6 +7,7 @@ using a skyline algorithm so that they don't collide with other objects." \version "2.12.0" \relative c''' { + \override Score.PaperColumn #'keep-inside-line = ##f \override TextScript #'outside-staff-priority = #2 \override DynamicLineSpanner #'outside-staff-priority = #1 c diff --git a/input/regression/spacing-stick-out.ly b/input/regression/spacing-stick-out.ly index b042ae1abc..099ae34651 100644 --- a/input/regression/spacing-stick-out.ly +++ b/input/regression/spacing-stick-out.ly @@ -1,9 +1,9 @@ \header { - texidoc = "If @code{keep-inside-line} is set for the relevant - PaperColumn, LilyPond will space a line to prevent text sticking out - of the right margin." + texidoc = "LilyPond will space a line to prevent text sticking out of the + right margin unless @code{keep-inside-line} is false for the relevant + PaperColumn." } @@ -12,7 +12,6 @@ \layout { ragged-right = ##t } \relative c' { - \override Score.PaperColumn #'keep-inside-line = ##t c1 c1^"This is a really long text" c } diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 26adbfd471..7b2f1c1e87 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1326,6 +1326,7 @@ (skyline-vertical-padding . 0.6) ;; (stencil . ,ly:paper-column::print) + (keep-inside-line . #t) (line-break-permission . allow) (non-musical . #t) (page-break-permission . allow) @@ -1463,6 +1464,7 @@ (axes . (,X)) (before-line-breaking . ,ly:paper-column::before-line-breaking) (horizontal-skylines . ,ly:separation-item::calc-skylines) + (keep-inside-line . #t) ;; (stencil . ,ly:paper-column::print) (X-extent . ,ly:axis-group-interface::width) |