]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/included/generating-output.itexi
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / included / generating-output.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of FIXME
3
4 @c This is about "compiling" a lilypond file
5 @c (Learning 1 Tutorial), **not** compiling the
6 @c source code.
7
8 @macro lilypadOSX
9 @warning{These instructions assume that you are using the LilyPond
10 application.  If you are using any of the programs described in
11 @rweb{Easier editing}, please consult the documentation for
12 those programs if you have any problems.}
13
14
15 @subsubheading Step 1. Create your @file{.ly} file
16
17 Double click the @command{LilyPond.app}, an example file will open.
18
19 @sourceimage{Learning_Macos_welcome,,,}
20
21 From the menus along the top left of your screen, select
22 @w{@code{File > Save}}.
23
24 @sourceimage{Learning_Macos_Save_menu,,,}
25
26 Choose a name for your file, for example @file{test.ly}.
27
28 @sourceimage{Learning_Macos_Save_file_with_name,,,}
29
30
31 @subsubheading Step 2. Compile (with LilyPad)
32
33 From the same menus, select
34 @w{@code{Compile > Tyepset}}.
35
36 @sourceimage{Learning_Macos_Typeset_menu,,,}
37
38 A new window will open showing a progress log of the compilation
39 of the file you have just saved.
40
41 @sourceimage{Learning_Macos_Compiling_log,,,}
42
43
44 @subsubheading Step 3. View output
45
46 Once the compilation has finished, a PDF file will be created with
47 the same name as the original file and will be automatically
48 opened in the default PDF viewer and displayed on your screen.
49
50 @sourceimage{Learning_Macos_pdf_output,,,}
51
52
53 @subsubheading Other commands
54
55 To create new files for LilyPond, begin by selecting
56 @w{@code{File > New}}
57
58 @sourceimage{Learning_Macos_New_menu,,,}
59
60 or @w{@code{File > Open}} to open and edit existing files you have
61 saved previously.
62
63 @sourceimage{Learning_Macos_Open_menu,,,}
64
65 You must save any new edits you make to your file before you
66 @w{@code{Compile > Tyepset}} and if the PDF file is not displayed
67 check the window with the progress log for any errors.
68
69 If you are not using the defualt Preview PDF viewer that comes
70 with the Mac Operating system and you have the PDF file generated
71 from a previous compilation open, then any further compilations
72 may fail to generate an update PDF until you close the original.
73
74
75
76 @end macro
77
78
79 @macro lilypadWindows
80 @warning{These instructions assume that you are using the built-in
81 LilyPad editor.  If you are using any of the programs described in
82 @rweb{Easier editing}, please consult the documentation for
83 those programs if you have any problems compiling a file.}
84
85
86 @subsubheading Step 1. Create your @file{.ly} file
87
88 Double-click the LilyPond icon on your desktop, an example file will open.
89
90 @sourceimage{Learning_Win7_Welcome_File_Whole,,,}
91
92 From the menus that appear along the top of the example file,
93 select @w{@code{File > Save as}}. Do not use the @w{@code{File > Save}}
94 for the example file as this will not work until you have given it a
95 valid LilyPond file name.
96
97 @sourceimage{Learning_Win7_Save_Menu,,,}
98
99 Choose a name for your file, for example @file{test.ly}.
100
101 @sourceimage{Learning_Win7_Save_File_With_Name,,,}
102
103
104 @subsubheading Step 2a. Compile (with drag-and-drop)
105
106 Depending on what you prefer, to compile your file either:
107
108 Drag-and-drop the file directly onto the LilyPond icon.
109
110 @sourceimage{Learning_Win7_Open_Dragndrop,,,}
111
112 Right-click on the file and from the pop-up context menu choose
113 @w{@code{Open with > LilyPond}}.
114
115 @sourceimage{Learning_Win7_Open_Context_Menu,,,}
116
117
118 @subsubheading Step 2b. Compile (with double-clicking)
119
120 Or simply double-click the @file{test.ly}.
121
122
123 @subsubheading Step 3. View output
124
125 During the compilation of the @file{test.ly} file, a command window
126 will, very briefly open and then close. Three additional files will
127 have been created during this process.
128
129 @sourceimage{Learning_Win7_All_Files_Created,,,}
130
131 The PDF file contains the engraved @file{test.ly} file.
132
133 @sourceimage{Learning_Win7_Pdf_Output,,,}
134
135
136 @subsubheading Other commands
137
138 To create a new file, begin by selecting @w{@code{File > New}} from
139 within any previously created file.
140
141 @sourceimage{Learning_Win7_New_Menu,,,}
142
143 @noindent
144 or @w{@code{File > Open}} to open and edit any files you have saved
145 before.
146
147 @sourceimage{Learning_Win7_Open_Menu,,,}
148
149 You must save any new edits you make before you compile it and if the
150 PDF file is not created, check the log file that will have been created
151 during the compilation attempt, for any errors.
152
153 @sourceimage{Learning_Win7_Log_File,,,}
154
155 This log file is overwritten each time you compile your LilyPond file.
156
157 The PS file is used internally by LilyPond to create the PDF file and
158 can be ignored. It also gets overwritten each time you compile your
159 file.
160
161 If you are viewing your file in a PDF viewer, then you must close the
162 PDF if you wish to make a new compilation as it may fail to create
163 the new PDF while it is still being viewed.
164
165
166 @end macro
167
168
169 @c not lilypad at all, but I ran out of names.  :(
170 @macro lilypadCommandLine
171 @warning{These instructions assume that you are familiar with
172 command-line programs.  If you are using any of the programs
173 described in @rweb{Easier editing}, please consult the
174 documentation for those programs if you have any problems
175 compiling a file.}
176
177
178 @subsubheading Step 1. Create your @file{.ly} file
179
180 Create a text file called @file{test.ly} and enter:
181
182 @c double \\ required because this is inside a macro!
183 @example
184 \\version "@w{@version{}}"
185 @{
186   c' e' g' e'
187 @}
188 @end example
189
190
191 @subsubheading Step 2. Compile (with command-line)
192
193 To process @file{test.ly}, type the following at the command prompt:
194
195 @example
196 lilypond test.ly
197 @end example
198
199 @noindent
200 You will see something resembling:
201
202 @example
203 GNU LilyPond @w{@version{}}
204 Processing `test.ly'
205 Parsing...
206 Interpreting music...
207 Preprocessing graphical objects...
208 Solving 1 page-breaking chunks...[1: 1 pages]
209 Drawing systems...
210 Layout output to `test.ps'...
211 Converting to `./test.pdf'...
212 @end example
213
214 @subsubheading Step 3. View output
215
216 You may view or print the resulting @file{test.pdf}.
217
218 @end macro
219
220