]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/tweaks.itely
Second round of reorg for the Learning manual.
[lilypond.git] / Documentation / user / tweaks.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @node Tweaking output
3 @chapter Tweaking output
4
5 Tweak explanation.
6
7
8 @menu
9 * Fixing overlapping notation::  
10 @end menu
11
12
13 @node Fixing overlapping notation
14 @section Fixing overlapping notation
15
16 This may come as a surprise, but LilyPond isn't perfect.  Some notation
17 elements can overlap.  This is unfortunate, but (in most cases) is easily
18 solved.
19
20 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
21 e4^\markup{ \italic ritenuto } g b e
22 @end lilypond
23
24 @cindex padding
25
26 The easiest solution is to increase the distance between the object
27 (in this case text, but it could easily be fingerings or dynamics
28 instead) and the note.  In LilyPond, this is called the
29 @code{padding} property; it is measured in staff spaces.  For most
30 objects, this value is around 1.0 or less (it varies with each
31 object). We want to increase it, so let's try 1.5
32
33 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
34 \once \override TextScript #'padding = #1.5
35 e4^\markup{ \italic ritenuto } g b e
36 @end lilypond
37
38 That looks better, but it isn't quite big enough.  After experimenting
39 with a few values, we think 2.3 is the best number in this case.  However,
40 this number is merely the result of experimentation and my personal
41 taste in notation.  Try the above example with 2.3... but also try higher
42 (and lower) numbers.  Which do you think looks the best?
43
44 @cindex extra-offset
45
46 Another solution gives us complete control over placing the object -- we
47 can move it horizontally or vertically.  This is done with the
48 @code{extra-offset} property.  It is slightly more complicated and can
49 cause other problems.  When we move objects with @code{extra-offset},
50 the movement is done after LilyPond has placed all other objects.  This means
51 that the result can overlap with other objects.
52
53 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
54 \once \override TextScript #'extra-offset = #'( 1.0 . -1.0 )
55 e4^\markup{ \italic ritenuto } g b e
56 @end lilypond
57
58 With @code{extra-offset}, the first number controls the horizontal
59 movement (left is negative); the second number controls the vertical
60 movement (up is positive).  After a bit of experimenting, we decided
61 that these values look good
62
63 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
64 \once \override TextScript #'extra-offset = #'( -1.6 . 1.0 )
65 e4^\markup{ \italic ritenuto } g b e
66 @end lilypond
67
68 @noindent
69 Again, these numbers are simply the result of a few experiments and
70 looking at the output.  You might prefer the text to be slightly higher,
71 or to the left, or whatever.  Try it and look at the result!
72
73
74 @seealso
75
76 This manual: @ref{The \override command}, @ref{Common tweaks}.
77