]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/changing-defaults.itely
* Documentation/user/tutorial.itely (Integrating text and music):
[lilypond.git] / Documentation / user / changing-defaults.itely
index 619f897ffc33d771a45c3e30f1101bc8c7b594d2..fac60f1751e03754500a703f00470c7c46a0bfa7 100644 (file)
@@ -12,7 +12,7 @@ are available and explains how to lookup which knob to use for a
 certain effect.
 
 The controls available for tuning are described in a separate
-document, the @internalsref{Program reference} manual. This manual
+document, the @internalsref{Program reference} manual. That manual
 lists all different variables, functions and options available in
 LilyPond. It is written as a HTML document, which is available
 @uref{http://lilypond.org/doc/Documentation/user/out-www/lilypond-internals/,on-line},
@@ -432,8 +432,8 @@ one context. In the following example, articulations and notes are
 entered separately,
 
 @verbatim
-music = \notes { c4 c4 }
-arts = \notes  { s4-. s4-> }
+music =  { c4 c4 }
+arts =  { s4-. s4-> }
 @end verbatim
 
 They are combined by sending both to the same @context{Voice} context,
@@ -444,13 +444,11 @@ They are combined by sending both to the same @context{Voice} context,
   >>
 @end verbatim
 @lilypond[raggedright]
-music = \notes { c4 c4 }
-arts = \notes  { s4-. s4-> }
-\score {
-  \notes \relative c''  << \new Staff \context Voice = "A" \music
+music =  { c4   c4 }
+arts =   { s4-. s4-> }
+   \relative c''  << \new Staff \context Voice = "A" \music
      \context Voice = "A" \arts
   >>
-} 
 @end lilypond
 
 @cindex @code{\context}
@@ -534,7 +532,7 @@ second group of eighth notes.
 
 There is also an @code{\unset} command,
 @quotation
-  @code{\set }@var{context}@code{.}@var{prop}
+  @code{\unset }@var{context}@code{.}@var{prop}
 @end quotation
 
 @noindent
@@ -852,11 +850,11 @@ to indicate improvisation in Jazz pieces,
   \context { \Staff
     \accepts "ImproVoice"
   }}
-  \score { \notes \relative c'' {
+   \relative c'' {
     a4 d8 bes8 \new ImproVoice { c4^"ad lib" c 
      c4 c^"undress" c_"while playing :)" c } 
     a1 
-  }}
+  }
 @end lilypond
 
 
@@ -973,16 +971,14 @@ Putting both into a @code{\paper} block, like
 Then the output at the start of this subsection can be entered as
 
 @verbatim
-\score {
-  \notes \relative c'' {
+\relative c'' {
      a4 d8 bes8
      \new ImproVoice {
        c4^"ad lib" c 
        c4 c^"undress"
        c c_"while playing :)"
      }
-     a1 
-  }
+     a1
 }
 @end verbatim
   
@@ -1512,11 +1508,11 @@ all three mechanisms work for every object that supports
 
 @itemize @bullet
 @item @code{font-encoding}
-is a symbol that sets layout of the glyphs. Choices include
-@code{text} for normal text, @code{braces} (for piano staff braces),
-@code{music} (the standard music font, including ancient glyphs),
-@code{dynamic} (for dynamic signs) and @code{number} for the number
-font.
+is a symbol that sets layout of the glyphs. Choices include @code{ec}
+for @TeX{} EC font encoding, @code{fetaBraces} (for piano staff
+braces), @code{fetaMusic} (the standard music font, including ancient
+glyphs), @code{fetaDynamic} (for dynamic signs) and @code{fetaNumber}
+for the number font.
 
 
 @item @code{font-family}
@@ -1630,7 +1626,7 @@ Markups can be stored in variables, and these variables
 may be attached to notes, like
 @verbatim
 allegro = \markup { \bold \large { Allegro } }
-\notes { a^\allegro b c d }
+ { a^\allegro b c d }
 @end verbatim
 
 
@@ -1673,9 +1669,47 @@ for formatting.
 
 
 @menu
+* Text encoding::               
 * Overview of text markup commands::  
 @end menu
 
+@node Text encoding
+@subsection Text encoding
+
+Texts can be entered in different encodings.  The encoding of the
+file can be set with @code{\encoding}.
+
+@example
+  \encoding "latin1"
+@end example
+
+This command may be placed anywhere in the input file. The current
+encoding is passed as an extra argument to @code{\markup} commands.
+
+If no @code{\encoding} has been specified, then the encoding is taken
+from the @code{\paper} block (or @code{\bookpaper}, if @code{\paper}
+does not specify encoding). The variable @code{inputencoding} may be
+set to a string or symbol specifying  the encoding, eg.
+
+@verbatim
+  \paper {
+    inputencoding = "latin1"
+  } 
+@end verbatim
+
+There is a special encoding, called @code{TeX}. This encoding does not
+reencode text for the font used. Rather, it tries to guess the width
+of @TeX{} commands, such as @code{\"}. Strings encoded with @code{TeX}
+are passed to the output back-end verbatim.
+
+@cindex encoding
+@cindex @code{\encoding}
+@cindex inputencoding
+@cindex @TeX{} commands in strings
+
+
+
+
 @node  Overview of text markup commands
 @subsection Overview of text markup commands
 
@@ -1881,12 +1915,11 @@ The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
 c8 c4 c4 c4
 @end lilypond
 
-Normally, @code{shortest-duration-space} is set to 1.2, which is the
+Normally, @code{spacing-increment} is set to 1.2, which is the
 width of a note head, and @code{shortest-duration-space} is set to
-2.0, meaning that the shortest note gets 2 NHW (i.e. 2 times
-@code{shortest-duration-space}) of space. For normal notes, this space
-is always counted from the left edge of the symbol, so the shortest
-notes are generally followed by one NHW of space.
+2.0, meaning that the shortest note gets 2 NHW  of space. For normal
+notes, this space is always counted from the left edge of the symbol, so
+the shortest notes are generally followed by one NHW of space.
 
 If one would follow the above procedure exactly, then adding a single
 32th note to a score that uses 8th and 16th notes, would widen up the
@@ -1928,16 +1961,15 @@ for controlling the stem/bar line spacing. The following example
 shows these corrections, once with default settings, and once with
 exaggerated corrections:
 
-@lilypond
-    \score { \notes {
+@lilypond[raggedright]
+{
       c'4 e''4 e'4 b'4 |
       b'4 e''4 b'4 e''4|
       \override Staff.NoteSpacing #'stem-spacing-correction = #1.5
       \override Staff.StaffSpacing #'stem-spacing-correction = #1.5
       c'4 e''4 e'4 b'4 |
       b'4 e''4 b'4 e''4|      
-    }
-    \paper { raggedright = ##t } }
+}
 @end lilypond
 
 @cindex SpacingSpanner, overriding properties
@@ -2137,7 +2169,7 @@ default format is created, and it may be used as a template for
 different styles.
 
  
-
+@cindex \bookpaper
 @cindex header
 @cindex footer
 @cindex page layout
@@ -2195,19 +2227,24 @@ footers to each page.
 
 The default layout responds to the following settings in the
 @code{\bookpaper} block
+@cindex \bookpaper
 
 @table @code
 @item hsize
  The width of the page
 @item vsize
  The height of the page
-@item top-margin
+@item topmargin
  Margin between header and top of the page
-@item bottom-margin
+@item bottommargin
  Margin between footer and bottom of the page
-@item head-sep
+@item leftmargin
+ Margin between the left side of the page and the beginning  of the music.
+@item linewidth
+ The length of the paper line.
+@item headsep
  Distance between top-most music system and the page header
-@item foot-sep
+@item footsep
  Distance between bottom-most music system and the page footer
 @item raggedbottom
  If set to true, systems will not be spread across the page.  
@@ -2215,9 +2252,39 @@ The default layout responds to the following settings in the
  If set to true, systems will not be spread to fill the last page.
 @end table
 
+@example
+        \bookpaper@{
+           hsize = 2\cm
+           topmargin = 3\cm
+           bottommargin = 3\cm
+           raggedlastbottom = ##t
+        @}
+@end example
+
+You can also define these values in scheme. In that case @code{mm},
+@code{in}, @code{pt} and @code{cm} are variables defined in
+@file{book-paper-defaults.ly} with values in millimeters. That's why the
+value has to be multiplied in the example above.
+
+@example
+        \bookpaper@{
+        #(define bottommargin (* 2 cm)) 
+        @}
+@end example
+
+
+@refbugs
+
+The option rightmargin is defined but doesn't set the right margin
+yet. The value for the right margin has to be defined adjusting the
+values of the leftmargin and linewidth.
+
 The default page header puts the page number and the @code{instrument}
 field from the @code{\header} block on a line.
 
+
+
+
 @cindex copyright
 @cindex tagline
 
@@ -2230,6 +2297,15 @@ The header and footer are created by the functions @code{make-footer}
 and @code{make-header}, defined in @code{\bookpaper}. The default
 implementations are in @file{scm/page-layout.scm}.
 
+The following settings influence the header and footer layout.
+
+@table @code
+@item printpagenumber
+  this boolean controls whether a pagenumber is printed. 
+@end table
+
+
+
 The page layout itself is done by two functions:
 @code{page-music-height} and @code{page-make-stencil}. The former
 tells the line-breaking algorithm how much space can be spent on a