]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/learning/templates.itely
Docs: Fix broken refs
[lilypond.git] / Documentation / learning / templates.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5
6     When revising a translation, copy the HEAD committish of the
7     version that you are working on.  See TRANSLATION for details.
8 @end ignore
9
10 @c \version "2.12.0"
11
12 @node Templates
13 @appendix Templates
14
15 This section of the manual contains templates with the LilyPond score
16 already set up for you.  Just add notes, run LilyPond, and enjoy
17 beautiful printed scores!
18
19 @c bad node name for ancient notation to avoid conflict
20 @menu
21 * Single staff::
22 * Piano templates::
23 * String quartet::
24 * Vocal ensembles::
25 * Orchestral templates::
26 * Ancient notation templates::
27 * Jazz combo::
28 * lilypond-book templates::
29 @end menu
30
31
32 @node Single staff
33 @appendixsec Single staff
34
35 @appendixsubsec Notes only
36
37 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,addversion]
38 {single-staff-template-with-only-notes.ly}
39
40
41 @appendixsubsec Notes and lyrics
42
43 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,addversion]
44 {single-staff-template-with-notes-and-lyrics.ly}
45
46 @appendixsubsec Notes and chords
47
48 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
49 {single-staff-template-with-notes-and-chords.ly}
50
51 @appendixsubsec Notes, lyrics, and chords.
52
53 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
54 {single-staff-template-with-notes,-lyrics,-and-chords.ly}
55
56
57 @node Piano templates
58 @appendixsec Piano templates
59
60 @appendixsubsec Solo piano
61
62 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
63 {piano-template-simple.ly}
64
65 @appendixsubsec Piano and melody with lyrics
66
67 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
68 {piano-template-with-melody-and-lyrics.ly}
69
70 @appendixsubsec Piano centered lyrics
71
72 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
73 {piano-template-with-centered-lyrics.ly}
74
75 @appendixsubsec Piano centered dynamics
76
77 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
78 {piano-template-with-centered-dynamics.ly}
79
80
81 @node String quartet
82 @appendixsec String quartet
83
84 @appendixsubsec String quartet
85
86 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
87 {string-quartet-template-simple.ly}
88
89 @appendixsubsec String quartet parts
90
91 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
92 {string-quartet-template-with-separate-parts.ly}
93
94
95 @node Vocal ensembles
96 @appendixsec Vocal ensembles
97
98 @appendixsubsec SATB vocal score
99
100 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
101 {vocal-ensemble-template.ly}
102
103 @appendixsubsec SATB vocal score and automatic piano reduction
104
105 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
106 {vocal-ensemble-template-with-automatic-piano-reduction.ly}
107
108 @appendixsubsec SATB with aligned contexts
109
110 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
111 {vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly}
112
113
114 @node Orchestral templates
115 @appendixsec Orchestral templates
116
117 @appendixsubsec Orchestra, choir and piano
118 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
119 {orchestra,-choir-and-piano-template.ly}
120
121
122 @c bad node name to avoid node name conflict
123 @node Ancient notation templates
124 @appendixsec Ancient notation templates
125
126 @appendixsubsec Transcription of mensural music
127
128 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
129 {ancient-notation-template----modern-transcription-of-mensural-music.ly}
130
131 @appendixsubsec Gregorian transcription template
132
133 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
134 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
135
136 @node Jazz combo
137 @appendixsec Jazz combo
138
139 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
140 {jazz-combo-template.ly}
141
142
143
144
145 @ignore
146 This isn't very useful, and only duplicates material in
147 "global issues".  And if this info changes, this section often
148 gets forgotten.
149
150 @no de Other templates
151 @se ction Other templates
152 @su bsection All headers
153
154 This template displays all available headers.  Some of them are only
155 used in the Mutopia project; they don't affect the printed output at
156 all.  They are used if you want the piece to be listed with different
157 information in the Mutopia database than you wish to have printed on the
158 music.  For example, Mutopia lists the composer of the famous D major
159 violin concerto as TchaikovskyPI, whereas perhaps you wish to print
160 "Petr Tchaikowski" on your music.
161
162 @ The `line-width' is for \header.
163 @li lypond[quote,verbatim,ragged-right,line-width]
164 \version "2.12.0"
165 \header {
166   dedication = "dedication"
167   title = "Title"
168   subtitle = "Subtitle"
169   subsubtitle = "Subsubtitle"
170   composer = "Composer (xxxx-yyyy)"
171   opus = "Opus 0"
172   piece = "Piece I"
173   meter = "meter"
174   instrument = "Instrument"
175   arranger = "Arranger"
176   poet = "Poet"
177   texttranslator = "Translator"
178   copyright = "public domain"
179
180   % These are headers used by the Mutopia Project
181   % http://www.mutopiaproject.org/
182   mutopiatitle = ""
183   mutopiacomposer = ""
184   mutopiapoet = ""
185   mutopiainstrument = ""
186   date = "composer's dates"
187   source = "urtext "
188   maintainer = "your name here"
189   maintainerEmail = "your email here"
190   maintainerWeb = "your home page"
191   lastupdated = "2004/Aug/26"
192 }
193
194 \score {
195   { c'4 }
196   \header {
197     piece = "piece1"
198     opus = "opus1"
199   }
200 }
201
202 \score {
203   { c'4 }
204   \header {
205     piece = "piece2"
206     opus = "opus2"
207   }
208 }
209 @end lilypond
210 @end ignore
211
212
213 @node lilypond-book templates
214 @appendixsec lilypond-book templates
215
216 These templates are for use with @code{lilypond-book}.  If you're not familiar
217 with this program, please refer to 
218 FIXME
219 @c @rprogram{LilyPond-book}.
220
221 @appendixsubsec LaTeX
222
223 You can include LilyPond fragments in a LaTeX document.
224
225 @example
226 \documentclass[]@{article@}
227
228 \begin@{document@}
229
230 Normal LaTeX text.
231
232 \begin@{lilypond@}
233 \relative c'' @{
234 a4 b c d
235 @}
236 \end@{lilypond@}
237
238 More LaTeX text.
239
240 \begin@{lilypond@}
241 \relative c'' @{
242 d4 c b a
243 @}
244 \end@{lilypond@}
245 \end@{document@}
246 @end example
247
248 @appendixsubsec Texinfo
249
250 You can include LilyPond fragments in Texinfo; in fact, this entire manual
251 is written in Texinfo.
252
253 @example
254 \input texinfo
255 @@node Top
256
257 Texinfo text
258
259 @@lilypond[verbatim,fragment,ragged-right]
260 a4 b c d
261 @@end lilypond
262
263 More Texinfo text
264
265 @@lilypond[verbatim,fragment,ragged-right]
266 d4 c b a
267 @@end lilypond
268
269 @@bye
270 @end example
271
272
273 @appendixsubsec xelatex
274
275 @verbatim
276 \documentclass{article}
277 \usepackage{ifxetex}
278 \ifxetex
279 %xetex specific stuff
280 \usepackage{xunicode,fontspec,xltxtra}
281 \setmainfont[Numbers=OldStyle]{Times New Roman}
282 \setsansfont{Arial}
283 \else
284 %This can be empty if you are not going to use pdftex
285 \usepackage[T1]{fontenc}
286 \usepackage[utf8]{inputenc}
287 \usepackage{mathptmx}%Times
288 \usepackage{helvet}%Helvetica
289 \fi
290 %Here you can insert all packages that pdftex also understands
291 \usepackage[ngerman,finnish,english]{babel}
292 \usepackage{graphicx}
293
294 \begin{document}
295 \title{A short document with LilyPond and xelatex}
296 \maketitle
297
298 Normal \textbf{font} commands inside the \emph{text} work,
299 because they \textsf{are supported by \LaTeX{} and XeteX.}
300 If you want to use specific commands like \verb+\XeTeX+, you
301 should include them again in a \verb+\ifxetex+ environment.
302 You can use this to print the \ifxetex \XeTeX{} command \else
303 XeTeX command \fi which is not known to normal \LaTeX .
304
305 In normal text you can easily use LilyPond commands, like this:
306
307 \begin{lilypond}
308 {a2 b c'8 c' c' c'}
309 \end{lilypond}
310
311 \noindent
312 and so on.
313
314 The fonts of snippets set with LilyPond will have to be set from
315 inside
316 of the snippet. For this you should read the AU on how to use
317 lilypond-book.
318
319 \selectlanguage{ngerman}
320 Auch Umlaute funktionieren ohne die \LaTeX -Befehle, wie auch alle
321 anderen
322 seltsamen Zeichen: __ ______, wenn sie von der Schriftart
323 unterst__tzt werden.
324 \end{document}
325 @end verbatim
326
327