Sophie

Sophie

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- header_tag -->
<html lang="es">
<head>
<title>Hojas de estilo - GNU LilyPond Learning Manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="GNU LilyPond Learning Manual">
<meta name="generator" content="makeinfo 4.11">
<link title="Top" rel="start" href="index.es.html#Top">
<link rel="up" href="Suggestions-for-writing-LilyPond-files.es.html#Suggestions-for-writing-LilyPond-files" title="Sugerencias para escribir archivos de LilyPond">
<link rel="prev" href="Saving-typing-with-variables-and-functions.es.html#Saving-typing-with-variables-and-functions" title="Ahorrar tecleo mediante variables y funciones">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1999--2007 por los autores

_The translation of the following copyright notice is provided
for courtesy to non-English speakers, but only the notice in English
legally counts._

_La traducción de la siguiente nota de copyright se ofrece como
cortesía para las personas de habla no inglesa, pero únicamente la
nota en inglés tiene validez legal._

     Se otorga permiso para copiar, distribuir y/o modificar este
     documento bajo los términos de la Licencia de Documentación
     Libre de GNU, versión 1.1 o cualquier versión posterior
     publicada por la Free Software Foundation; sin ninguna de las
     secciones invariantes.  Se incluye una copia de esta licencia
     dentro de la sección titulada ``Licencia de Documentación Libre
     de GNU''.
     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="Style-sheets"></a>
Anterior:&nbsp;<a rel="previous" accesskey="p" href="Saving-typing-with-variables-and-functions.es.html#Saving-typing-with-variables-and-functions">Ahorrar tecleo mediante variables y funciones</a>,
Arriba:&nbsp;<a rel="up" accesskey="u" href="Suggestions-for-writing-LilyPond-files.es.html#Suggestions-for-writing-LilyPond-files">Sugerencias para escribir archivos de LilyPond</a>
<hr>
</div>

<h4 class="subsection">5.1.5 Hojas de estilo</h4>

<p>La salida que produce LilyPond se puede modificar profundamente; consulte
<a href="Tweaking-output.es.html#Tweaking-output">Trucar la salida</a> para leer detalles sobre este asunto.  Pero ¿qué ocurre si tiene muchos
archivos a los que les quiere aplicar sus propios trucos?  O ¿qué ocurre si, sencillamente,
quiere separar los trucos de la propia música?  Todo esto
es bastante fácil de conseguir.

   <p>Veamos un ejemplo.  No se preocupe si no entiende
las partes que tienen todos los <code>#()</code>.  Esto se explicará en
<a href="Advanced-tweaks-with-Scheme.es.html#Advanced-tweaks-with-Scheme">Trucos avanzados con Scheme</a>.

   <blockquote>
<pre class="verbatim">     
     mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
       #:line(#:dynamic "mp" #:text #:italic "dolce" )))
     marcaDeTempo = #(define-music-function (parser location markp) (string?)
     #{
       \once \override Score . RehearsalMark #'self-alignment-X = #left
       \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
       \mark \markup { \bold $markp }
     #})
     
     \relative c'' {
       \tempo 4=50
       a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
       \marcaDeTempo "Poco piu mosso"
       cis4.\&lt; d8 e4 fis | g8(\! fis)-. e( d)-. cis2
     }
</pre>
     <p>
 <a href="../15/lily-e5e30e86.ly"> <img align="middle" border="0" src="../15/lily-e5e30e86.png" alt="[image of music]"> </a>
</p>

   </blockquote>

   <p>Existen varios problemas con la salida que se superpone; los arreglaremos utilizando
las técnicas descritas en <a href="Moving-objects.es.html#Moving-objects">Mover objetos</a>.  Pero también haremos algo respecto a
las definiciones <code>mpdolce</code> y <code>tempoMark</code>.  Éstas producen la salida que
deseamos, pero quizá las querríamos utilizar en otra pieza. 
Podríamos simplemente copiarlas y pegarlas al principio de cada archivo,
pero sería bastante molesto.  También hace que se queden las definiciones
a la vista dentro de nuestros archivos de música, y yo personalmente encuentro
todos los <code>#()</code> bastante poco estéticos.  Los vamos a esconder dentro de otro archivo:

<pre class="example">%%% guardar esto en un archivo de nombre "definiciones.ly"
mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
  #:line(#:dynamic "mp" #:text #:italic "dolce" )))
tempoMark = #(define-music-function (parser location markp) (string?)
#{
  \once \override Score . RehearsalMark #'self-alignment-X = #left
  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
  \mark \markup { \bold $markp }
#})
</pre>
   <p>Ahora modificaremos la música (guardemos este archivo como <samp><span class="file">"musica.ly"</span></samp>).

<!-- We have to do this awkward example/lilypond-non-verbatim -->
<!-- because we can't do the \include stuff in the manual. -->
<pre class="example">\include "definiciones.ly"

\relative c'' {
  \tempo 4=50
  a4.\mpdolce d8 cis4--\glissando a | b4 bes a2
  \once \override Score.RehearsalMark #'padding = #2.0
  \tempoMark "Poco piu mosso"
  cis4.\&lt; d8 e4 fis | g8(\! fis)-. e( d)-. cis2
}
</pre>
   <blockquote>
     <p>
 <a href="../11/lily-5b03168d.ly"> <img align="middle" border="0" src="../11/lily-5b03168d.png" alt="[image of music]"> </a>
</p>

   </blockquote>

   <p>Eso tiene mejor aspecto, pero haremos algunos cambios más.  El glissando es difícil
de ver, así que lo haremos más grueso y lo acercaremos a las cabezas de las notas.  Pondremos
la indicación metronómica encima de la clave, en lugar de ir encima de la primera
nota.  Y por último, mi profesor de composición odia las indicaciones de compás &lsquo;C&rsquo;,
así que la convertiremos en &lsquo;4/4&rsquo;.

   <p>Sin embargo, no debe cambiar el archivo <samp><span class="file">musica.ly</span></samp>.  Sustituya nuestro archivo <samp><span class="file">definiciones.ly</span></samp>
con éste:

<pre class="example">%%%  definiciones.ly
mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
  #:line( #:dynamic "mp" #:text #:italic "dolce" )))
tempoMark = #(define-music-function (parser location markp) (string?)
#{
  \once \override Score . RehearsalMark #'self-alignment-X = #left
  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
  \mark \markup { \bold $markp }
#})

\layout{
  \context { \Score
    \override MetronomeMark #'extra-offset = #'(-9 . 0)
    \override MetronomeMark #'padding = #'3
  }
  \context { \Staff
    \override TimeSignature #'style = #'numbered
  }
  \context { \Voice
    \override Glissando #'thickness = #3
    \override Glissando #'gap = #0.1
  }
}
</pre>
   <blockquote>
     <p>
 <a href="../f4/lily-44dde205.ly"> <img align="middle" border="0" src="../f4/lily-44dde205.png" alt="[image of music]"> </a>
</p>

   </blockquote>

   <p>¡Eso tiene un aspecto mucho mejor!  Ahora suponga que quiere publicar esta
pieza.  A mi profesor de composición no le gustan las indicaciones de compás &lsquo;C&rsquo;,
pero yo les tengo cierto cariño.  Copiaremos el archivo
actual <samp><span class="file">definiciones.ly</span></samp> a <samp><span class="file">publicar-web.ly</span></samp> y modificaremos
éste.  Como el propósito de esta música es producir un PDF que va a mostrarse
en la pantalla, también vamos a aumentar el
tamaño general de la salida.

<pre class="example">%%%  definiciones.ly
mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
  #:line( #:dynamic "mp" #:text #:italic "dolce" )))
tempoMark = #(define-music-function (parser location markp) (string?)
#{
  \once \override Score . RehearsalMark #'self-alignment-X = #left
  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
  \mark \markup { \bold $markp }
#})

#(set-global-staff-size 23)
\layout{
  \context { \Score
    \override MetronomeMark #'extra-offset = #'(-9 . 0)
    \override MetronomeMark #'padding = #'3
  }
  \context { \Staff
  }
  \context { \Voice
    \override Glissando #'thickness = #3
    \override Glissando #'gap = #0.1
  }
}
</pre>
   <blockquote>
     <p>
 <a href="../66/lily-c4610079.ly"> <img align="middle" border="0" src="../66/lily-c4610079.png" alt="[image of music]"> </a>
</p>

   </blockquote>

   <p>Ahora, en la música, simplemente sustituyo
<code>\include "definiciones.ly"</code> por
<code>\include "publicar-web.ly"</code>.  Por supuesto, podríamos hacer esto aún más
práctico.  Podríamos hacer un archivo <samp><span class="file">definiciones.ly</span></samp> que contuviera
solamente las definiciones de <code>mpdolce</code> y <code>tempoMark</code>, un archivo
<samp><span class="file">web-publish.ly</span></samp> que contuviera solamente la sección <code>\layout</code>
que se mostró en el ejemplo, y un archivo <samp><span class="file">universidad.ly</span></samp> que contendría
solamente los trucos para producir la salida que le gusta a mi
profesor.  La parte más alta de <samp><span class="file">musica.ly</span></samp> tendría entonces este aspecto:

<pre class="example">\include "definiciones.ly"

%%%  ¡Quitar el comentario de una sola de estas líneas!
\include "publicar-web.ly"
%\include "universidad.ly"
</pre>
   <p>Este enfoque puede ser útil incluso si va a producir sólo un conjunto de particellas. 
Yo utilizo media docena de archivos de
&lsquo;hojas de estilo&rsquo; para mis proyectos.  Comienzo todos los archivos de música con
<code>\include "../global.ly"</code>, que contiene

<pre class="example">%%%   global.ly
\version "2.11.57"<!-- /@w -->
#(ly:set-option 'point-and-click #f)
\include "../iniciar/iniciar-definiciones.ly"
\include "../iniciar/iniciar-disposicion.ly"
\include "../iniciar/iniciar-cabeceras.ly"
\include "../iniciar/iniciar-papel.ly"
</pre>
   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Anterior:&nbsp;<a rel="previous" accesskey="p" href="Saving-typing-with-variables-and-functions.es.html#Saving-typing-with-variables-and-functions">Ahorrar tecleo mediante variables y funciones</a>,
Arriba:&nbsp;<a rel="up" accesskey="u" href="Suggestions-for-writing-LilyPond-files.es.html#Suggestions-for-writing-LilyPond-files">Sugerencias para escribir archivos de LilyPond</a>
</div>

<div style="background-color: #e8ffe8; padding: 2; border: #c0ffc0 1px solid;">
<p>
<font size="-1">
Esta página corresponde a LilyPond-2.11.57 (rama de desarrollo).
<br>
<address>
Informe de los fallos a través de la lista en español <a href="http://es.groups.yahoo.com/group/lilypond-es/">lilypond-es</a>, o en inglés a través de <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>
Se agradecen las <a href="http://lilypond.org/web/devel/participating/documentation-adding">sugerencias para la documentación</a>.
</font>
</p>
</div>


<P>
 Otros idiomas: <a href="Style-sheets.html">English</a>, <a href="Style-sheets.fr.html">français</a>, <a href="Style-sheets.de.html">deutsch</a>.
 <BR>
 
</P>
</BODY></html>