<!-- header_tag --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> <html> <!-- Copyright C 1999-2009 by the authors Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections. A copy of the license is included in the section entitled "GNU Free Documentation License". --> <!-- Created on December 15, 2009 by texi2html 1.82 texi2html was written by: Lionel Cons <Lionel.Cons@cern.ch> (original author) Karl Berry <karl@freefriends.org> Olaf Bachmann <obachman@mathematik.uni-kl.de> and many others. Maintained by: Many creative people. Send bugs and suggestions to <texi2html-bug@nongnu.org> --> <head> <title>GNU LilyPond Notation Reference: 4.4.3 Explicit staff and system positioning</title> <meta name="description" content="GNU LilyPond Notation Reference: 4.4.3 Explicit staff and system positioning"> <meta name="keywords" content="GNU LilyPond Notation Reference: 4.4.3 Explicit staff and system positioning"> <meta name="resource-type" content="document"> <meta name="distribution" content="global"> <meta name="Generator" content="texi2html 1.82"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link href="index.de.html#index" rel="start" title="GNU LilyPond — Notation Reference"> <link href="LilyPond-command-index.de.html#LilyPond-command-index" rel="index" title="F. LilyPond command index"> <link href="index_toc.de.html#SEC_Contents" rel="contents" title="Table of Contents"> <link href="index_abt.de.html#SEC_About" rel="help" title="About This Document"> <link href="Vertical-spacing.de.html#Vertical-spacing" rel="up" title="4.4 Vertical spacing"> <link href="LilyPond-index.de.html#LilyPond-index" rel="next" title="G. LilyPond index"> <link href="Vertical-spacing-between-systems.de.html#Vertical-spacing-between-systems" rel="previous" title="4.4.2 Vertical spacing between systems"> <link rel="stylesheet" type="text/css" title="Patrick McCarty's design" href="lilypond-mccarty.css"> <link rel="alternate stylesheet" type="text/css" href="lilypond.css" title="Andrew Hawryluk's design"> <link rel="alternate stylesheet" type="text/css" href="lilypond-blue.css" title="Kurt Kroon's blue design"> <!--[if lte IE 7]> <link href="lilypond-ie-fixes.css" rel="stylesheet" type="text/css"> <![endif]--> </head> <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <div id="main"> <a name="Explicit-staff-and-system-positioning"></a> <table class="nav_table"> <tr><td valign="middle" align="left" colspan="1">[<a href="Spacing-issues.de.html#Spacing-issues" title="Beginning of this chapter or previous chapter"> << Spacing issues </a>]</td><td valign="middle" align="center" colspan="3">[<a href="index.de.html#index" title="Cover (top) of document" rel="start">Top</a>][<a href="index_toc.de.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LilyPond-command-index.de.html#LilyPond-command-index" title="Index" rel="index">Index</a>][<a href="index_abt.de.html#SEC_About" title="About (help)" rel="help"> ? </a>]</td><td valign="middle" align="right" colspan="1">[<a href="Changing-defaults.de.html#Changing-defaults" title="Next chapter"> Changing defaults >> </a>]</td></tr><tr><td valign="middle" align="left" colspan="2">[<a href="Vertical-spacing-between-systems.de.html#Vertical-spacing-between-systems" title="Previous section in reading order" accesskey="p" rel="previous"> < Vertical spacing between systems </a>]</td><td valign="middle" align="center" colspan="1">[<a href="Vertical-spacing.de.html#Vertical-spacing" title="Up section" accesskey="u" rel="up"> Up : Vertical spacing </a>]</td><td valign="middle" align="right" colspan="2">[<a href="Two_002dpass-vertical-spacing.de.html#Two_002dpass-vertical-spacing" title="Next section in reading order" accesskey="n" rel="next"> Two-pass vertical spacing > </a>]</td></tr></table> <a name="Explicit-staff-and-system-positioning"></a> <h3 class="subsection">4.4.3 Explicit staff and system positioning</h3> <p>One way to understand the <code>VerticalAxisGroup</code> and <code>\paper</code> settings explained in the previous two sections is as a collection of different settings that primarily concern the amount of vertical padding different staves and systems running down the page. </p> <p>It is possible to approach vertical spacing in a different way using <code>NonMusicalPaperColumn #'line-break-system-details</code>. Where <code>VerticalAxisGroup</code> and <code>\paper</code> settings specify vertical padding, <code>NonMusicalPaperColumn #'line-break-system-details</code> specifies exact vertical positions on the page. </p> <p><code>NonMusicalPaperColumn #'line-break-system-details</code> accepts an associative list of five different settings: </p> <ul> <li> <code>X-offset</code> </li><li> <code>Y-offset</code> </li><li> <code>alignment-offsets</code> </li><li> <code>alignment-extra-space</code> </li><li> <code>fixed-alignment-extra-space</code> </li></ul> <p>Grob overrides, including the overrides for <code>NonMusicalPaperColumn</code> below, can occur in any of three different places in an input file: </p> <ul> <li> in the middle of note entry directly </li><li> in a <code>\context</code> block </li><li> in the <code>\with</code> block </li></ul> <p>When we override <code>NonMusicalPaperColumn</code>, we use the usual <code>\override</code> command in <code>\context</code> blocks and in the <code>\with</code> block. On the other hand, when we override <code>NonMusicalPaperColumn</code> in the middle of note entry, use the special <code>\overrideProperty</code> command. Here are some example <code>NonMusicalPaperColumn</code> overrides with the special <code>\overrideProperty</code> command: </p> <blockquote><pre class="example">\overrideProperty NonMusicalPaperColumn #'line-break-system-details #'((X-offset . 20)) \overrideProperty NonMusicalPaperColumn #'line-break-system-details #'((Y-offset . 40)) \overrideProperty NonMusicalPaperColumn #'line-break-system-details #'((X-offset . 20) (Y-offset . 40)) \overrideProperty NonMusicalPaperColumn #'line-break-system-details #'((alignment-offsets . (0 -15))) \overrideProperty NonMusicalPaperColumn #'line-break-system-details #'((X-offset . 20) (Y-offset . 40) (alignment-offsets . (0 -15))) </pre></blockquote> <p>To understand how each of these different settings work, we begin by looking at an example that includes no overrides at all. </p> <blockquote><p> <a href="../b2/lily-ca37a0cc.ly"> <img align="middle" border="0" src="../b2/lily-ca37a0cc.png" alt="[image of music]"> </a> </p> </blockquote> <p>This score isolates line- and page-breaking information in a dedicated voice. This technique of creating a breaks voice will help keep layout separate from music entry as our example becomes more complicated. See <a href="Using-an-extra-voice-for-breaks.de.html#Using-an-extra-voice-for-breaks">Using an extra voice for breaks</a>. </p> <p>Explicit <code>\breaks</code> evenly divide the music into six measures per line. Vertical spacing results from LilyPond’s defaults. To set the vertical startpoint of each system explicitly, we can set the <code>Y-offset</code> pair in the <code>line-break-system-details</code> attribute of the <code>NonMusicalPaperColumn</code> grob: </p> <blockquote><p> <a href="../8d/lily-28cb4ac7.ly"> <img align="middle" border="0" src="../8d/lily-28cb4ac7.png" alt="[image of music]"> </a> </p> </blockquote> <p>Note that <code>line-break-system-details</code> takes an associative list of potentially many values, but that we set only one value here. Note, too, that the <code>Y-offset</code> property here determines the exact vertical position on the page at which each new system will render. </p> <p>Now that we have set the vertical startpoint of each system explicitly, we can also set the vertical startpoint of each staff within each system manually. We do this using the <code>alignment-offsets</code> subproperty of <code>line-break-system-details</code>. </p> <blockquote><p> <a href="../b1/lily-829a3d69.ly"> <img align="middle" border="0" src="../b1/lily-829a3d69.png" alt="[image of music]"> </a> </p> </blockquote> <p>Note that here we assign two different values to the <code>line-break-system-details</code> attribute of the <code>NonMusicalPaperColumn</code> grob. Though the <code>line-break-system-details</code> attribute alist accepts many additional spacing parameters (including, for example, a corresponding <code>X-offset</code> pair), we need only set the <code>Y-offset</code> and <code>alignment-offsets</code> pairs to control the vertical startpoint of every system and every staff. Finally, note that <code>alignment-offsets</code> specifies the vertical positioning of staves but not of staff groups. </p> <blockquote><p> <a href="../c1/lily-06e9d4b6.ly"> <img align="middle" border="0" src="../c1/lily-06e9d4b6.png" alt="[image of music]"> </a> </p> </blockquote> <p>Some points to consider: </p> <ul> <li> When using <code>alignment-offsets</code>, lyrics count as a staff. </li><li> The units of the numbers passed to <code>X-offset</code>, <code>Y-offset</code> and <code>alignment-offsets</code> are interpreted as multiples of the distance between adjacent staff lines. Positive values move staves and lyrics up, negative values move staves and lyrics down. </li><li> Because the <code>NonMusicalPaperColumn #'line-break-system-details</code> settings given here allow the positioning of staves and systems anywhere on the page, it is possible to violate paper or margin boundaries or even to print staves or systems on top of one another. Reasonable values passed to these different settings will avoid this. </li></ul> <a name="See-also-41"></a> <h4 class="subsubheading">See also</h4> <p>Snippets: <a href="../../../input/lsr/lilypond-snippets/Spacing.html#Spacing">Spacing</a>. </p> <hr size="6"> <table class="nav_table"> <tr><td valign="middle" align="left" colspan="1">[<a href="Spacing-issues.de.html#Spacing-issues" title="Beginning of this chapter or previous chapter"> << Spacing issues </a>]</td><td valign="middle" align="center" colspan="3">[<a href="index.de.html#index" title="Cover (top) of document" rel="start">Top</a>][<a href="index_toc.de.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LilyPond-command-index.de.html#LilyPond-command-index" title="Index" rel="index">Index</a>][<a href="index_abt.de.html#SEC_About" title="About (help)" rel="help"> ? </a>]</td><td valign="middle" align="right" colspan="1">[<a href="Changing-defaults.de.html#Changing-defaults" title="Next chapter"> Changing defaults >> </a>]</td></tr><tr><td valign="middle" align="left" colspan="2">[<a href="Vertical-spacing-between-systems.de.html#Vertical-spacing-between-systems" title="Previous section in reading order" accesskey="p" rel="previous"> < Vertical spacing between systems </a>]</td><td valign="middle" align="center" colspan="1">[<a href="Vertical-spacing.de.html#Vertical-spacing" title="Up section" accesskey="u" rel="up"> Up : Vertical spacing </a>]</td><td valign="middle" align="right" colspan="2">[<a href="Two_002dpass-vertical-spacing.de.html#Two_002dpass-vertical-spacing" title="Next section in reading order" accesskey="n" rel="next"> Two-pass vertical spacing > </a>]</td></tr></table> <!-- footer_tag --> <div class="footer"> <p class="footer_version"> This page is for LilyPond-2.12.3 (stable-branch). </p> <p class="footer_report"> Your <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions for the documentation</a> are welcome, please report errors to our <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">bug list</a>. </p> </div> <p id="languages"> Other languages: <a href="Explicit-staff-and-system-positioning.es.html">espaƱol</a>. <br> </p> <!-- FOOTER --> <!-- end div#main here --> </div> <div id="tocframe"> <p class="toc_uplink"><a href="../index.de.html" title="Documentation Index"><< Back to Documentation Index</a></p> <h4 class="toc_header"> <a href="index.de.html#index" title="Start of the manual">Notation Reference</a></h4> <div class="contents"> <ul class="toc"> <li><a name="toc-Musical-notation-1" href="Musical-notation.de.html#Musical-notation">1. Musical notation</a> <ul class="toc"> <li><a name="toc-Pitches-1" href="Pitches.de.html#Pitches">1.1 Pitches</a> </li> <li><a name="toc-Rhythms-1" href="Rhythms.de.html#Rhythms">1.2 Rhythms</a> </li> <li><a name="toc-Expressive-marks-1" href="Expressive-marks.de.html#Expressive-marks">1.3 Expressive marks</a> </li> <li><a name="toc-Repeats-1" href="Repeats.de.html#Repeats">1.4 Repeats</a> </li> <li><a name="toc-Simultaneous-notes-1" href="Simultaneous-notes.de.html#Simultaneous-notes">1.5 Simultaneous notes</a> </li> <li><a name="toc-Staff-notation-1" href="Staff-notation.de.html#Staff-notation">1.6 Staff notation</a> </li> <li><a name="toc-Editorial-annotations-1" href="Editorial-annotations.de.html#Editorial-annotations">1.7 Editorial annotations</a> </li> <li><a name="toc-Text-1" href="Text.de.html#Text">1.8 Text</a> </li> </ul> </li> <li><a name="toc-Specialist-notation-1" href="Specialist-notation.de.html#Specialist-notation">2. Specialist notation</a> <ul class="toc"> <li><a name="toc-Vocal-music-1" href="Vocal-music.de.html#Vocal-music">2.1 Vocal music</a> </li> <li><a name="toc-Keyboard-and-other-multi_002dstaff-instruments-1" href="Keyboard-and-other-multi_002dstaff-instruments.de.html#Keyboard-and-other-multi_002dstaff-instruments">2.2 Keyboard and other multi-staff instruments</a> </li> <li><a name="toc-Unfretted-string-instruments-1" href="Unfretted-string-instruments.de.html#Unfretted-string-instruments">2.3 Unfretted string instruments</a> </li> <li><a name="toc-Fretted-string-instruments-1" href="Fretted-string-instruments.de.html#Fretted-string-instruments">2.4 Fretted string instruments</a> </li> <li><a name="toc-Percussion-1" href="Percussion.de.html#Percussion">2.5 Percussion</a> </li> <li><a name="toc-Wind-instruments-1" href="Wind-instruments.de.html#Wind-instruments">2.6 Wind instruments</a> </li> <li><a name="toc-Chord-notation-1" href="Chord-notation.de.html#Chord-notation">2.7 Chord notation</a> </li> <li><a name="toc-Ancient-notation-1" href="Ancient-notation.de.html#Ancient-notation">2.8 Ancient notation</a> </li> <li><a name="toc-World-music-1" href="World-music.de.html#World-music">2.9 World music</a> </li> </ul> </li> <li><a name="toc-General-input-and-output-1" href="General-input-and-output.de.html#General-input-and-output">3. General input and output</a> <ul class="toc"> <li><a name="toc-Input-structure-1" href="Input-structure.de.html#Input-structure">3.1 Input structure</a> </li> <li><a name="toc-Titles-and-headers-1" href="Titles-and-headers.de.html#Titles-and-headers">3.2 Titles and headers</a> </li> <li><a name="toc-Working-with-input-files-1" href="Working-with-input-files.de.html#Working-with-input-files">3.3 Working with input files</a> </li> <li><a name="toc-Controlling-output-1" href="Controlling-output.de.html#Controlling-output">3.4 Controlling output</a> </li> <li><a name="toc-MIDI-output-1" href="MIDI-output.de.html#MIDI-output">3.5 MIDI output</a> </li> </ul> </li> <li class="toc_current"><a name="toc-Spacing-issues-1" href="Spacing-issues.de.html#Spacing-issues">4. Spacing issues</a> <ul class="toc"> <li><a name="toc-Paper-and-pages-1" href="Paper-and-pages.de.html#Paper-and-pages">4.1 Paper and pages</a> </li> <li><a name="toc-Music-layout-1" href="Music-layout.de.html#Music-layout">4.2 Music layout</a> </li> <li><a name="toc-Breaks-1" href="Breaks.de.html#Breaks">4.3 Breaks</a> </li> <li class="toc_current"><a name="toc-Vertical-spacing-1" href="Vertical-spacing.de.html#Vertical-spacing">4.4 Vertical spacing</a> <ul class="toc"> <li><a name="toc-Vertical-spacing-inside-a-system-1" href="Vertical-spacing-inside-a-system.de.html#Vertical-spacing-inside-a-system">4.4.1 Vertical spacing inside a system</a> </li> <li><a name="toc-Vertical-spacing-between-systems-1" href="Vertical-spacing-between-systems.de.html#Vertical-spacing-between-systems">4.4.2 Vertical spacing between systems</a> </li> <li class="toc_current"><a name="toc-Explicit-staff-and-system-positioning-1" href="Explicit-staff-and-system-positioning.de.html#Explicit-staff-and-system-positioning">4.4.3 Explicit staff and system positioning</a> </li> <li><a name="toc-Two_002dpass-vertical-spacing-1" href="Two_002dpass-vertical-spacing.de.html#Two_002dpass-vertical-spacing">4.4.4 Two-pass vertical spacing</a> </li> <li><a name="toc-Vertical-collision-avoidance-1" href="Vertical-collision-avoidance.de.html#Vertical-collision-avoidance">4.4.5 Vertical collision avoidance</a> </li> </ul> </li> <li><a name="toc-Horizontal-spacing-1" href="Horizontal-spacing.de.html#Horizontal-spacing">4.5 Horizontal spacing</a> </li> <li><a name="toc-Fitting-music-onto-fewer-pages-1" href="Fitting-music-onto-fewer-pages.de.html#Fitting-music-onto-fewer-pages">4.6 Fitting music onto fewer pages</a> </li> </ul> </li> <li><a name="toc-Changing-defaults-1" href="Changing-defaults.de.html#Changing-defaults">5. Changing defaults</a> <ul class="toc"> <li><a name="toc-Interpretation-contexts-1" href="Interpretation-contexts.de.html#Interpretation-contexts">5.1 Interpretation contexts</a> </li> <li><a name="toc-Explaining-the-Internals-Reference-1" href="Explaining-the-Internals-Reference.de.html#Explaining-the-Internals-Reference">5.2 Explaining the Internals Reference</a> </li> <li><a name="toc-Modifying-properties-1" href="Modifying-properties.de.html#Modifying-properties">5.3 Modifying properties</a> </li> <li><a name="toc-Useful-concepts-and-properties-1" href="Useful-concepts-and-properties.de.html#Useful-concepts-and-properties">5.4 Useful concepts and properties</a> </li> <li><a name="toc-Advanced-tweaks-1" href="Advanced-tweaks.de.html#Advanced-tweaks">5.5 Advanced tweaks</a> </li> </ul> </li> <li><a name="toc-Interfaces-for-programmers-1" href="Interfaces-for-programmers.de.html#Interfaces-for-programmers">6. Interfaces for programmers</a> <ul class="toc"> <li><a name="toc-Music-functions-1" href="Music-functions.de.html#Music-functions">6.1 Music functions</a> </li> <li><a name="toc-Programmer-interfaces-1" href="Programmer-interfaces.de.html#Programmer-interfaces">6.2 Programmer interfaces</a> </li> <li><a name="toc-Building-complicated-functions-1" href="Building-complicated-functions.de.html#Building-complicated-functions">6.3 Building complicated functions</a> </li> <li><a name="toc-Markup-programmer-interface-1" href="Markup-programmer-interface.de.html#Markup-programmer-interface">6.4 Markup programmer interface</a> </li> <li><a name="toc-Contexts-for-programmers-1" href="Contexts-for-programmers.de.html#Contexts-for-programmers">6.5 Contexts for programmers</a> </li> <li><a name="toc-Scheme-procedures-as-properties-1" href="Scheme-procedures-as-properties.de.html#Scheme-procedures-as-properties">6.6 Scheme procedures as properties</a> </li> <li><a name="toc-Using-Scheme-code-instead-of-_005ctweak-1" href="Using-Scheme-code-instead-of-_005ctweak.de.html#Using-Scheme-code-instead-of-_005ctweak">6.7 Using Scheme code instead of <code>\tweak</code></a> </li> <li><a name="toc-Difficult-tweaks-1" href="Difficult-tweaks.de.html#Difficult-tweaks">6.8 Difficult tweaks</a> </li> </ul> </li> <li><a name="toc-Literature-list-1" href="Literature-list.de.html#Literature-list">A. Literature list</a> </li> <li><a name="toc-Notation-manual-tables-1" href="Notation-manual-tables.de.html#Notation-manual-tables">B. Notation manual tables</a> <ul class="toc"> <li><a name="toc-Chord-name-chart-1" href="Chord-name-chart.de.html#Chord-name-chart">B.1 Chord name chart</a> </li> <li><a name="toc-Common-chord-modifiers-1" href="Common-chord-modifiers.de.html#Common-chord-modifiers">B.2 Common chord modifiers</a> </li> <li><a name="toc-Predefined-fretboard-diagrams-1" href="Predefined-fretboard-diagrams.de.html#Predefined-fretboard-diagrams">B.3 Predefined fretboard diagrams</a> </li> <li><a name="toc-MIDI-instruments-1" href="MIDI-instruments.de.html#MIDI-instruments">B.4 MIDI instruments</a> </li> <li><a name="toc-List-of-colors-1" href="List-of-colors.de.html#List-of-colors">B.5 List of colors</a> </li> <li><a name="toc-The-Feta-font-1" href="The-Feta-font.de.html#The-Feta-font">B.6 The Feta font</a> </li> <li><a name="toc-Note-head-styles-1" href="Note-head-styles.de.html#Note-head-styles">B.7 Note head styles</a> </li> <li><a name="toc-Text-markup-commands-1" href="Text-markup-commands.de.html#Text-markup-commands">B.8 Text markup commands</a> </li> <li><a name="toc-Text-markup-list-commands-1" href="Text-markup-list-commands.de.html#Text-markup-list-commands">B.9 Text markup list commands</a> </li> <li><a name="toc-List-of-articulations-1" href="List-of-articulations.de.html#List-of-articulations">B.10 List of articulations</a> </li> <li><a name="toc-Percussion-notes-1" href="Percussion-notes.de.html#Percussion-notes">B.11 Percussion notes</a> </li> <li><a name="toc-All-context-properties-1" href="All-context-properties.de.html#All-context-properties">B.12 All context properties</a> </li> <li><a name="toc-Layout-properties-1" href="Layout-properties.de.html#Layout-properties">B.13 Layout properties</a> </li> <li><a name="toc-Identifiers-1" href="Identifiers.de.html#Identifiers">B.14 Identifiers</a> </li> <li><a name="toc-Scheme-functions-1" href="Scheme-functions.de.html#Scheme-functions">B.15 Scheme functions</a> </li> </ul> </li> <li><a name="toc-Cheat-sheet-1" href="Cheat-sheet.de.html#Cheat-sheet">C. Cheat sheet</a> </li> <li><a name="toc-LilyPond-grammar-1" href="LilyPond-grammar.de.html#LilyPond-grammar">D. LilyPond grammar</a> </li> <li><a name="toc-GNU-Free-Documentation-License-1" href="GNU-Free-Documentation-License.de.html#GNU-Free-Documentation-License">E. GNU Free Documentation License</a> </li> <li><a name="toc-LilyPond-command-index-1" href="LilyPond-command-index.de.html#LilyPond-command-index">F. LilyPond command index</a> </li> <li><a name="toc-LilyPond-index-1" href="LilyPond-index.de.html#LilyPond-index">G. LilyPond index</a> </li> </ul> </div> </div> </body> </html>