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