Sophie

Sophie

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

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>Including LilyPond files - 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.es.html#Top">
<link rel="up" href="Working-with-input-files.es.html#Working-with-input-files" title="Working with input files">
<link rel="next" href="Different-editions-from-one-source.es.html#Different-editions-from-one-source" title="Different editions from one source">
<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="Including-LilyPond-files"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Different-editions-from-one-source.es.html#Different-editions-from-one-source">Different editions from one source</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Working-with-input-files.es.html#Working-with-input-files">Working with input files</a>
<hr>
</div>

<h4 class="subsection">3.3.1 Including LilyPond files</h4>

<p><a name="index-g_t_005cinclude-2413"></a><a name="index-g_t_005cinclude-2414"></a>
<a name="index-including-files-2415"></a>
A large project may be split up into separate files.  To refer to
another file, use

<pre class="example">\include "otherfile.ly"
</pre>
   <p>The line <code>\include "otherfile.ly"</code> is equivalent to pasting the
contents of <samp><span class="file">otherfile.ly</span></samp> into the current file at the place
where the <code>\include</code> appears.  For example, in a large
project you might write separate files for each instrument part
and create a &ldquo;full score&rdquo; file which brings together the
individual instrument files.  Normally the included file will
define a number of variables which then become available
for use in the full score file.  Tagged sections can be
marked in included files to assist in making them usable in
different places in a score, see <a href="Different-editions-from-one-source.es.html#Different-editions-from-one-source">Different editions from one source</a>.

   <p>Files in the current working directory may be referenced by
specifying just the file name after the <code>\include</code> command. 
Files in other locations may be included by giving either a full
path reference or a relative path reference (but use the UNIX
forward slash, /, rather than the DOS/Windows back slash, \, as the
directory separator.)  For example, if <samp><span class="file">stuff.ly</span></samp> is located
one directory higher than the current working directory, use

<pre class="example">\include "../stuff.ly"
</pre>
   <p class="noindent">or if the included orchestral parts files are all located in a
subdirectory called <samp><span class="file">parts</span></samp> within the current directory, use

<pre class="example">\include "parts/VI.ly"
\include "parts/VII.ly"
... etc
</pre>
   <p>Files which are to be included can also contain <code>\include</code>
statements of their own.  These second-level
<code>\include</code> statements are not interpreted until they have
been brought into the main file, so the file names they specify
must all be relative to the directory containing the main file,
not the directory containing the included file.

   <p>Files can also be included from a directory in a search path
specified as an option when invoking LilyPond from the command
line.  The included files are then specified using just their
file name.  For example, to compile <samp><span class="file">main.ly</span></samp> which includes
files located in a subdirectory called <samp><span class="file">parts</span></samp> by this method,
cd to the directory containing <samp><span class="file">main.ly</span></samp> and enter

<pre class="example">lilypond --include=parts main.ly
</pre>
   <p>and in main.ly write

<pre class="example">\include "VI.ly"
\include "VII.ly"
... etc
</pre>
   <p>Files which are to be included in many scores may be placed in
the LilyPond directory <samp><span class="file">../ly</span></samp>.  (The location of this
directory is installation-dependent - see <a name="index-Other-sources-2416"></a>of information
<a href="../lilypond-learning/Other-sources-of-information.es.html#Other-sources-of-information">Other sources of information</a>).  These files can then be included simply by
naming them on an <code>\include</code> statement.  This is how the
language-dependent files like <samp><span class="file">english.ly</span></samp> are included.

   <p>LilyPond includes a number of files by default when you start
the program.  These includes are not apparent to the user, but the
files may be identified by running <code>lilypond --verbose</code> from
the command line.  This will display a list of paths and files that
LilyPond uses, along with much other information.  Alternatively,
the more important of these files are discussed in <a name="index-Other-2417"></a>sources of information
<a href="../lilypond-learning/Other-sources-of-information.es.html#Other-sources-of-information">Other sources of information</a>.  These files may be edited, but changes to
them will be lost on installing a new version of LilyPond.

   <p>Some simple examples of using <code>\include</code> are shown in
<a name="index-Scores-and-parts-2418"></a><a href="../lilypond-learning/Scores-and-parts.es.html#Scores-and-parts">Scores and parts</a>.

<p class="noindent">

<h5 class="subsubheading">See also</h5>

   <p class="indent">
Learning Manual:
<a name="index-Other-sources-of-information-2419"></a><a href="../lilypond-learning/Other-sources-of-information.es.html#Other-sources-of-information">Other sources of information</a>,
<a name="index-Scores-and-parts-2420"></a><a href="../lilypond-learning/Scores-and-parts.es.html#Scores-and-parts">Scores and parts</a>.

<p class="noindent">

<h5 class="subsubheading">Known issues and warnings</h5>

<p>If an included file is given a name which is the same as one in
LilyPond's installation files, LilyPond's file from the
installation files takes precedence.

   <!-- footer_tag --><br><hr>
<div class="node">
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Different-editions-from-one-source.es.html#Different-editions-from-one-source">Different editions from one source</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Working-with-input-files.es.html#Working-with-input-files">Working with input files</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>

</BODY></html>