]> git.donarmstrong.com Git - lilypond.git/commitdiff
Change keep-inside-line defaults to true.
authorAndrew Hawryluk <ahawryluk@gmail.com>
Sat, 15 Jan 2011 20:42:03 +0000 (13:42 -0700)
committerGraham Percival <graham@percival-music.ca>
Tue, 1 Mar 2011 09:05:17 +0000 (09:05 +0000)
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:
Documentation/learning/tweaks.itely
Documentation/notation/text.itely
Documentation/notation/vocal.itely
Documentation/snippets/new/ancient-headword.ly
Documentation/snippets/new/chords-headword.ly
Documentation/snippets/new/editorial-headword.ly
Documentation/snippets/new/figured-bass-headword.ly
Documentation/snippets/new/fretted-headword.ly
Documentation/snippets/new/pitches-headword.ly
Documentation/snippets/new/simultaneous-headword.ly
Documentation/snippets/new/text-headword.ly
Documentation/web/ly-examples/example-header.ily
input/regression/balloon.ly
input/regression/font-bogus-ligature.ly
input/regression/font-family-override.ly
input/regression/font-name.ly
input/regression/hairpin-ending.ly
input/regression/harp-pedals-sanity-checks.ly
input/regression/harp-pedals-tweaking.ly
input/regression/lyric-extender-right-margin.ly
input/regression/lyrics-no-notes.ly
input/regression/markup-commands.ly
input/regression/markup-note.ly
input/regression/markup-syntax.ly
input/regression/markup-user.ly
input/regression/skyline-vertical-placement.ly
input/regression/spacing-stick-out.ly
scm/define-grobs.scm

index 844399d7f6e7deed5960a6e29528afb818f79fe4..99cfcf645f5512d44bd2b3ad77679e9e8a2f26ca 100644 (file)
@@ -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
 
index 6841e44dcb5e4bafc0d7fe99cfa7e69562c0e274..406f6be96d1f5abbea1629f2bf8678a1aede8a55 100644 (file)
@@ -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
 
 
index 47d60222a91a2d766fb4466f47509da74666cb83..e63729bb0fb3e1539d181c2512cc912e61f56fe2 100644 (file)
@@ -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
index f7568d728b65ea7d0931fedcd95046a90411f415..50a8ba81d5037f690077078178bdb872c296478e 100644 (file)
   doctitle = "headword"
 }
 
-\layout {
-  \context {
-    \Score
-    \override PaperColumn #'keep-inside-line = ##t
-    \override NonMusicalPaperColumn #'keep-inside-line = ##t
-  }
-}
-
 \include "gregorian.ly"
 
 \score {
index 5963f0fd8808503cf5ec2af59a5a32b1a94752a4..d267d561b7518ce6d2a91d5675af8313880aec37 100644 (file)
 }
 
 
-\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
index 626605f7a531f25a25d014c374d2451e1a90a4a5..6ae939e0fdbe5a40326f59c7dbcc300fb8de9168 100644 (file)
   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
index ad04108e81760d28d602530406fd96e56b38ebfe..469e72fad59c6c61b616d5f95eb3cea9a107c7e4 100644 (file)
@@ -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
 
 
index 32fafd0700c4b66b8ec353b179e9b9ad52af6fd0..3b221cb0ac61d428c66c3bb85954e4a1656be6b7 100644 (file)
@@ -22,8 +22,6 @@
   \context {
     \Score
     \remove "Bar_number_engraver"
-    \override PaperColumn #'keep-inside-line = ##t
-    \override NonMusicalPaperColumn #'keep-inside-line = ##t
   }
 }
 
index 8cc3eca8956ecb49c047c325b9946593dfe47b6a..9c78f065d06858d0685bd43b026103e22d53d202 100644 (file)
@@ -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 {
index 09ffbe04f09dfd2959b751da1d1c50c5485ed41c..caff63a477aea94a579b1b81a7ac5226615743a8 100644 (file)
@@ -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 = ""
index 58a410f37e5c4fe958db1a4b635cffe3248d3de8..10931fc9d7da60dbd576b8d13732ecaa68456238 100644 (file)
   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
index 0817b746832e5866b309b4853c167f73f00255ef..ab35243579863fdb764e86eea73c02c58c28bfc8 100644 (file)
   scoreTitleMarkup = ##f
 }
 
-\layout {
-  \context { \Score
-    \override PaperColumn #'keep-inside-line = ##t
-    \override NonMusicalPaperColumn #'keep-inside-line = ##t
-  }
-}
-
-
index a60f89e57c1854641ed7f57a283a9043de41bbbf..3a85fed660cc01ffe3025aa4b66cd6888132b5a9 100644 (file)
@@ -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
+    }
   }
 }
index b5abe6ccb5d2a5079890a104de5c431574c12dcc..1e46da7a0f37315eb58d07e7fa91430d4873e4d5 100644 (file)
@@ -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
+    }
+  }
 }
index 553747d4788583d02e8d1fa14b9165bc978974b0..45629a273e413e178e596b394890f7086cc9e964 100644 (file)
      (/ 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
     }
   }
+
 }
index 062f2f7549626d18b63bbd1048b7f1dfd34703a7..2e5eabfc4e1a92f23a1185dbaffc744564d70842 100644 (file)
@@ -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
index a5e33c426c7dcf941058ac1c078b4814cc0d823b..92648d2d4ba874a838f5d661baafc71631545f93 100644 (file)
@@ -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
   
   <<
index c918ddbe6fa91c369bd14838c84b7093bab2888b..60ba82177413afb210299b83a65f2319a287d3ad 100644 (file)
@@ -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:
index ad3f95552affba2d2c2f188649416a5cad0ada70..8b64e780631da59e2d3029f332fc48d3e3ec9756 100644 (file)
@@ -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
index 0317b53493728000adafe81cb2c428a8c152901e..9d76be3b3cb42d2363e95ed01b7b11454729c87f 100644 (file)
@@ -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
+}
index 3c6ef07e790dd3eb4fe54118954dde5d55a25de1..69e8d9c00c0cdb8868b18c431e7b6dc507bc82da 100644 (file)
@@ -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" { 
index 688cd2e6a614f729a0b49fcd1658762bbb3a0c02..b8f947d84ea302c237022140f70c0926de257db1 100644 (file)
@@ -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
     }
   }
 }
index 0cdc526b35e32890e049aba451e61ef20011082c..1cda8b33e19aa7b9aa748eed58b2e817ea8a226e 100644 (file)
@@ -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
+    }
+  }
+
+}
index 8a59a454b6dbfdb9e0c52f88e4ff776112857ec6..73b9cff77f23f61940af4e1c4ed9acb8b8932320 100644 (file)
@@ -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
+  }
+
 }
index 637734706063cfddee3c1efa8055dd108ae1e425..63b1450af00a8f8e29348595fef7a37be6f335d1 100644 (file)
@@ -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
+    }
+  }
 
+}
index 731db4f2c520dd0ca63e157a2ce6fbcc8d1359f8..b01a8a33d1f41dccc0a3bd040e9b849fb568c404 100644 (file)
@@ -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
index b042ae1abcf99c7189ffacdeb4a3dbdb280cf5e8..099ae34651e8d4ddfa59f5ee9673d3c3dae1ee12 100644 (file)
@@ -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
 }
 
index 26adbfd471b851b3cf65d475d3a89c4b60f2e4b1..7b2f1c1e87b852c681110a0ecb940c91fb5face3 100644 (file)
        (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)
        (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)