* Using variables for tweaks::
* Style sheets::
* Other sources of information::
-* Avoiding tweaks with slower processing::
* Advanced tweaks with Scheme::
@end menu
@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
@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
@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
doctitle = "headword"
}
-\layout {
- \context {
- \Score
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
- }
-}
-
\include "gregorian.ly"
\score {
}
-\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
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
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
\context {
\Score
\remove "Bar_number_engraver"
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
}
}
indent = 0\cm
}
-\layout {
- \context {
- \Score
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
- }
-}
-
% NR 1.1 Pitches
\header {
indent = 0\cm
}
-\layout {
- \context {
- \Score
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
- }
-}
-
-
\header {
lsrtags = "headwords"
texidoc = ""
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
scoreTitleMarkup = ##f
}
-\layout {
- \context { \Score
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
- }
-}
-
-
\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
+ }
}
}
ragged-right = ##T
}
-{
- c4^"November WHITMAN"
+\score{
+ {
+ c4^"November WHITMAN"
+ }
+
+ \layout {
+ \context {
+ \Score
+ \override PaperColumn #'keep-inside-line = ##f
+ }
+ }
}
(/ 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
}
}
+
}
{
+ \override Score.PaperColumn #'keep-inside-line = ##f
\override Staff.TimeSignature #'font-name = #"Times New Roman"
\time 3/4
\set Score.skipBars = ##t
\layout { ragged-right = ##t }
\relative c'' {
+ \override Score.PaperColumn #'keep-inside-line = ##f
c4 \> c4 c4\! c4_\ff \> c4 c4\!\p
<<
}
\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:
}
\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
\score{
{
\relative c' {
- \override Score.PaperColumn #'keep-inside-line = ##t
c4 d e f ~ | \break
f4 e d c |
}
e d c
}
}
-}
\ No newline at end of file
+}
\version "2.12.0"
<<
+ \override Score.PaperColumn #'keep-inside-line = ##f
\new Staff \relative c' {
\key aes \major
\context Voice = "1" {
\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
}
}
}
}
\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
+ }
+ }
+
+}
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
+ }
+
}
"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
+ }
+ }
+}
\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
\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."
}
\layout { ragged-right = ##t }
\relative c' {
- \override Score.PaperColumn #'keep-inside-line = ##t
c1 c1^"This is a really long text" c
}
(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)