Revert "update fret diagrams regression test"
[lilypond/csorensen.git] / Documentation / user / templates.itely
blob77fc6ca41de34822cd362271764f7c4f115223ee
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond.tely
3 @ignore
4     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
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
10 @c \version "2.11.38"
12 @node Templates
13 @appendix Templates
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!
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
31 @node Single staff
32 @appendixsec Single staff
34 @appendixsubsec Notes only
36 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,addversion]
37 {single-staff-template-with-only-notes.ly}
40 @appendixsubsec Notes and lyrics
42 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,addversion]
43 {single-staff-template-with-notes-and-lyrics.ly}
45 @appendixsubsec Notes and chords
47 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
48 {single-staff-template-with-notes-and-chords.ly}
50 @appendixsubsec Notes, lyrics, and chords.
52 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
53 {single-staff-template-with-notes,-lyrics,-and-chords.ly}
56 @node Piano templates
57 @appendixsec Piano templates
59 @appendixsubsec Solo piano
61 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
62 {piano-template-simple.ly}
64 @appendixsubsec Piano and melody with lyrics
66 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
67 {piano-template-with-melody-and-lyrics.ly}
69 @appendixsubsec Piano centered lyrics
71 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
72 {piano-template-with-centered-lyrics.ly}
74 @appendixsubsec Piano centered dynamics
76 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
77 {piano-template-with-centered-dynamics.ly}
80 @node String quartet
81 @appendixsec String quartet
83 @appendixsubsec String quartet
85 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
86 {string-quartet-template-simple.ly}
88 @appendixsubsec String quartet parts
90 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
91 {string-quartet-template-with-separate-parts.ly}
94 @node Vocal ensembles
95 @appendixsec Vocal ensembles
97 @appendixsubsec SATB vocal score
99 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
100 {vocal-ensemble-template.ly}
102 @appendixsubsec SATB vocal score and automatic piano reduction
104 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
105 {vocal-ensemble-template-with-automatic-piano-reduction.ly}
107 @appendixsubsec SATB with aligned contexts
109 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
110 {vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly}
113 @c bad node name to avoid node name conflict
114 @node Ancient notation templates
115 @appendixsec Ancient notation templates
117 @appendixsubsec Transcription of mensural music
119 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
120 {ancient-notation-template----modern-transcription-of-mensural-music.ly}
122 @appendixsubsec Gregorian transcription template
124 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
125 {ancient-notation-template----modern-transcription-of-gregorian-music.ly}
127 @node Jazz combo
128 @appendixsec Jazz combo
130 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
131 {jazz-combo-template.ly}
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.
141 @no de Other templates
142 @se ction Other templates
143 @su bsection All headers
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.
153 @ The `line-width' is for \header.
154 @li lypond[quote,verbatim,ragged-right,line-width]
155 \version "2.11.38"
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"
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"
185 \score {
186   { c'4 }
187   \header {
188     piece = "piece1"
189     opus = "opus1"
190   }
193 \score {
194   { c'4 }
195   \header {
196     piece = "piece2"
197     opus = "opus2"
198   }
200 @end lilypond
201 @end ignore
204 @node lilypond-book templates
205 @appendixsec lilypond-book templates
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}.
210 @appendixsubsec LaTeX
212 You can include LilyPond fragments in a LaTeX document.
214 @example
215 \documentclass[]@{article@}
217 \begin@{document@}
219 Normal LaTeX text.
221 \begin@{lilypond@}
222 \relative c'' @{
223 a4 b c d
225 \end@{lilypond@}
227 More LaTeX text.
229 \begin@{lilypond@}
230 \relative c'' @{
231 d4 c b a
233 \end@{lilypond@}
234 \end@{document@}
235 @end example
237 @appendixsubsec Texinfo
239 You can include LilyPond fragments in Texinfo; in fact, this entire manual
240 is written in Texinfo.
242 @example
243 \input texinfo
244 @@node Top
246 Texinfo text
248 @@lilypond[verbatim,fragment,ragged-right]
249 a4 b c d
250 @@end lilypond
252 More Texinfo text
254 @@lilypond[verbatim,fragment,ragged-right]
255 d4 c b a
256 @@end lilypond
258 @@bye
259 @end example
262 @appendixsubsec xelatex
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
279 %Here you can insert all packages that pdftex also understands
280 \usepackage[ngerman,finnish,english]{babel}
281 \usepackage{graphicx}
283 \begin{document}
284 \title{A short document with LilyPond and xelatex}
285 \maketitle
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 .
294 In normal text you can easily use LilyPond commands, like this:
296 \begin{lilypond}
297 {a2 b c'8 c' c' c'}
298 \end{lilypond}
300 \noindent
301 and so on.
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.
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