Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 3a7b4dfc766af1222d90c7f03a0844e6 > files > 8137

lilypond-doc-2.11.57-1mdv2009.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- header_tag -->
<html lang="en">
<head>
<title>Text alignment - GNU LilyPond Notation Reference</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="GNU LilyPond Notation Reference">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.fr.html#Top">
<link rel="up" href="Formatting-text.fr.html#Formatting-text" title="Formatting text">
<link rel="prev" href="Selecting-font-and-font-size.fr.html#Selecting-font-and-font-size" title="Selecting font and font size">
<link rel="next" href="Graphic-notation-inside-markup.fr.html#Graphic-notation-inside-markup" title="Graphic notation inside markup">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1999--2007 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''.
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
hr { border:0; height:1; color: #000000; background-color: #000000; }
/* hr {
  border:  none;
  height: 1px;
  color: #666666;
  background-color: #666666;
}
body {
  border-left: 1px solid #666666;
  border-right: 1px solid #666666;
  color: #332d28;
  margin-right: auto;
  margin-left: auto;
  width: 60em;
  list-style-type: square;
  font-family: Arial,Helvetica,sans-serif;
  padding-right: 1em;
  padding-left: 1em;
}
a {
  border-bottom: 1px dashed #344242;
  text-decoration: none;
  color: #344242;
}
a:link {
  text-decoration: none;
}
a:visited {
  border-bottom: 1px dashed #666666;
  color: #666666;
}
a:active {
  border-bottom: 1px solid #00cccc;
  color: #00cccc;
}
a:hover {
  border-bottom: 1px solid #1d7b85;
  color: #1d7b85;
}
blockquote {
  border: 1px solid #cccccc;
  padding: 3px;
  width: 40em;
}
.node {
  border-left: 1px solid #666666;
  margin: -0.5em 0px 1em;
  padding: 2px 1px 0px;
  font-style: italic;
}
.node a {
  border:  none;
  text-decoration: underline;
  font-style: normal;
  font-weight: bold;
}
.verbatim {
  font-family: "Courier New",Courier,monospace;
}
.unnumberedsubsubsec {
  font-size: large;
  color: #1d7b85;
}
.subsubheading {
  font-size: large;
  color: #3b220d;
}
.contents {
  border: 1px dashed #339999;
  margin: 3px 2em;
  list-style-type: square;
  padding-right: 1em;
  width: 40em;
  background-color: #fcfff9;
}
.contents a {
  border-bottom: 1px dashed #423d34;
  text-decoration: none;
  color: #423d34;
}
.contents a:visited {
  border-bottom: 1px dashed #666666;
  color: #666666;
}
.contents a:active {
  border-bottom: 1px solid #f0d86d;
  color: #f0d86d;
}
.contents a:hover {
  border-bottom: 1px solid #3b220d;
  color: #3b220d;
}
.menu {
  border-left: 1px dashed #339999;
  margin: 3px 2em 1em;
  list-style-type: square;
  padding-left: 1.4em;
  width: 40em;
}
.unnumbered {
}
h2 {
  font-size: x-large;
  color: #1d7b85;
}
*/
--></style>
</head>
<BODY BGCOLOR=WHITE TEXT=BLACK>

<div class="node">
<p>
<a name="Text-alignment"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Graphic-notation-inside-markup.fr.html#Graphic-notation-inside-markup">Graphic notation inside markup</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Selecting-font-and-font-size.fr.html#Selecting-font-and-font-size">Selecting font and font size</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Formatting-text.fr.html#Formatting-text">Formatting text</a>
<hr>
</div>

<h5 class="subsubsection">1.8.2.3 Text alignment</h5>

<p><a name="index-text_002c-aligning-1764"></a><a name="index-aligning-text-1765"></a>
This subsection discusses how to place text in markup mode,
inside a <code>\markup</code> block.  Markup objects can also
be moved as a whole, using the syntax described in
<a name="index-Moving-objects-1766"></a><a href="../lilypond-learning/Moving-objects.fr.html#Moving-objects">Moving objects</a>.

<!-- The padding commands should be mentioned on this page, but -->
<!-- most of these require \box to be more clearly illustrated. -vv -->
   <p><a name="index-text_002c-horizontal-alignment-1767"></a><a name="index-horizontal-text-alignment-1768"></a><a name="index-g_t_005cleft_002dalign-1769"></a><a name="index-g_t_005cleft_002dalign-1770"></a>
<a name="index-g_t_005ccenter_002dalign-1771"></a><a name="index-g_t_005ccenter_002dalign-1772"></a>
<a name="index-g_t_005cright_002dalign-1773"></a><a name="index-g_t_005cright_002dalign-1774"></a>

   <p>Markup objects may be aligned in different ways.  By default,
a text indication is aligned on its left edge: in the following
example, there is no difference
between the first and the second markup.

   <blockquote>
<pre class="verbatim">     
     a1-\markup { poco }
     e'
     a,-\markup { \left-align poco }
     e'
     a,-\markup { \center-align { poco } }
     e'
     a,-\markup { \right-align poco }
</pre>
     <p>
 <a href="../9d/lily-f8a32e18.ly">
  <img align="middle"
    border="0" src="../9d/lily-f8a32e18.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-g_t_005chalign-1775"></a><a name="index-g_t_005chalign-1776"></a>

   <p>The horizontal alignment may be fine-tuned
using a numeric value:

   <blockquote>
<pre class="verbatim">     
     a1-\markup { \halign #-1 poco }
     e'
     a,-\markup { \halign #0 poco }
     e'
     a,-\markup { \halign #0.5 poco }
     e'
     a,-\markup { \halign #2 poco }
</pre>
     <p>
 <a href="../81/lily-ca89ab59.ly">
  <img align="middle"
    border="0" src="../81/lily-ca89ab59.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

<p class="noindent">Some objects may have alignment procedures of their own,
and therefore are not affected by these commands.  It is
possible to move such markup objects as a whole, as shown
for instance in <a href="Text-marks.fr.html#Text-marks">Text marks</a>,

   <p><a name="index-text_002c-vertical-alignment-1777"></a><a name="index-vertical-text-alignment-1778"></a><a name="index-g_t_005craise-1779"></a><a name="index-g_t_005craise-1780"></a>
<a name="index-g_t_005clower-1781"></a><a name="index-g_t_005clower-1782"></a>

   <p>Vertical alignment is a bit more complex. As stated above,
markup objects can be moved as a whole; however, it is also
possible to move specific elements inside a markup block. 
In this case, the element to be moved needs to be preceded
with an <em>anchor point</em>, that can be another markup element
or an invisible object.  The following example demonstrates these
two possibilities; the last markup in this example has no anchor
point, and therefore is not moved.

   <blockquote>
<pre class="verbatim">     
     d2^\markup { 
       Acte I
       \raise #2 { Scène 1 } }
     a'
     g_\markup {
       \null
       \lower #4 \bold { Très modéré } }
     a
     d,^\markup {
       \raise #4 \italic { Une forêt. } }
     a'4 a g2 a
</pre>
     <p>
 <a href="../43/lily-bda00355.ly">
  <img align="middle"
    border="0" src="../43/lily-bda00355.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-g_t_005cgeneral_002dalign-1783"></a><a name="index-g_t_005cgeneral_002dalign-1784"></a>
<a name="index-g_t_005ctranslate-1785"></a><a name="index-g_t_005ctranslate-1786"></a>
<a name="index-g_t_005ctranslate_002dscaled-1787"></a><a name="index-g_t_005ctranslate_002dscaled-1788"></a>

   <p>Some commands can affect both the horizontal and vertical
alignment of text objects in markup mode.  Any object
affected by these commands must be preceded with an
anchor point:

   <blockquote>
<pre class="verbatim">     
     d2^\markup {
       Acte I
       \translate #'(-1 . 2) "Scène 1" }
     a'
     g_\markup {
       \null
       \general-align #Y #3.2 \bold "Très modéré" }
     a
     d,^\markup {
       \null
       \translate-scaled #'(-1 . 2) \teeny "Une forêt." }
     a'4 a g2 a
</pre>
     <p>
 <a href="../52/lily-742fb61c.ly">
  <img align="middle"
    border="0" src="../52/lily-742fb61c.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-g_t_005ccolumn-1789"></a><a name="index-g_t_005ccolumn-1790"></a>
<a name="index-g_t_005ccenter_002dcolumn-1791"></a><a name="index-g_t_005ccenter_002dcolumn-1792"></a>

   <p><a name="index-multi_002dline-markup-1793"></a><a name="index-multi_002dline-text-1794"></a><a name="index-columns_002c-text-1795"></a>
A markup object may include several lines of text. 
In the following example, each element or expression
is placed on its own line, either left-aligned or centered:

   <blockquote>
<pre class="verbatim">     
     \markup {
       \column {
         a
         "b c"
         \line { d e f }
       }
       \hspace #10
       \center-column {
         a
         "b c"
         \line { d e f }
       }
     }
</pre>
     <p>
 <a href="../bd/lily-b8ab081b.ly">
  <img align="middle"
    border="0" src="../bd/lily-b8ab081b.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-g_t_005cfill_002dline-1796"></a><a name="index-g_t_005cfill_002dline-1797"></a>

   <p><a name="index-centering-text-on-the-page-1798"></a>
Similarly, a list of elements or expressions may be
spread to fill the entire horizontal line width (if there
is only one element, it will be centered on the page). 
These expressions can, in turn, include multi-line text
or any other markup expression:

   <blockquote>
<pre class="verbatim">     
     \markup {
       \fill-line {
         \line { William S. Gilbert }
         \center-column {
           \huge \smallCaps "The Mikado"
           or
           \smallCaps "The Town of Titipu"
         }
         \line { Sir Arthur Sullivan }
       }
     }
     \markup {
       \fill-line { 1885 } 
     }
</pre>
     <p>
 <a href="../68/lily-fbba50c9.ly">
  <img align="middle"
    border="0" src="../68/lily-fbba50c9.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p><a name="index-g_t_005cwordwrap-1799"></a><a name="index-g_t_005cwordwrap-1800"></a>
<a name="index-g_t_005cjustify-1801"></a><a name="index-g_t_005cjustify-1802"></a>

   <p><a name="index-wordwrapped-text-1803"></a><a name="index-justified-text-1804"></a>
Long text indications can also be automatically wrapped
accordingly to the given line width.  These will be
either left-aligned or justified, as shown in
the following example.

   <blockquote>
<pre class="verbatim">     
     \markup {
       \column {
         \line  \smallCaps { La vida breve }
         \line \bold { Acto I }
         \wordwrap \italic {
           (La escena representa el corral de una casa de
           gitanos en el Albaicín de Granada. Al fondo una
           puerta por la que se vé el negro interior de
           una Fragua, iluminado por los rojos resplandores
           del fuego.) 
         }
         \hspace #0
     
         \line \bold { Acto II }
         \override #'(line-width . 50)
         \justify \italic {
           (Calle de Granada. Fachada de la casa de Carmela
           y su hermano Manuel con grandes ventanas abiertas
           a través de las que se ve el patio
           donde se celebra una alegre fiesta)
         }
       }
     }
</pre>
     <p>
 <a href="../33/lily-9b2eb9e3.ly">
  <img align="middle"
    border="0" src="../33/lily-9b2eb9e3.png" alt="[image of music]">
 </a>
</p>

   </blockquote>

   <p>An exhaustive list of text alignment commands
can be found in <a href="Align.fr.html#Align">Align</a>.

<!-- TODO: add @seealso -->
   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Graphic-notation-inside-markup.fr.html#Graphic-notation-inside-markup">Graphic notation inside markup</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Selecting-font-and-font-size.fr.html#Selecting-font-and-font-size">Selecting font and font size</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Formatting-text.fr.html#Formatting-text">Formatting text</a>
</div>

<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
<p>
<font size="-1">
Cette page documente LilyPond-2.11.57 (branche de développement).
<br>
<address>
Rapportez toute anomalie en français à <a href="mailto:lilypond-user-fr@gnu.org">lilypond-user-fr@gnu.org</a> ou en anglais à <a href="http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs">http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs</a> </address>
<br>
Vos <a href="http://lilypond.org/web/devel/participating/documentation-adding">suggestions à propos de la documentation</a> sont les bienvenues.
</font>
</p>
</div>

</BODY></html>