]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/usage/running.itely
Docs: AU: output can be directed to a folder
[lilypond.git] / Documentation / usage / running.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.  For details, see the Contributors'
8     Guide, node Updating translation committishes..
9 @end ignore
10
11 @c \version "2.12.0"
12
13
14 @node Running lilypond
15 @chapter Running @command{lilypond}
16
17 This chapter details the technicalities of running LilyPond.
18
19 @menu
20 * Normal usage::
21 * Command-line usage::
22 * Error messages::
23 * Common errors::
24 @end menu
25
26
27 @node Normal usage
28 @section Normal usage
29
30 Most users run LilyPond through a GUI; if you have not done so
31 already, please read the @rlearning{Tutorial}.  If you use an alternate
32 editor to write lilypond files, see the documentation for that
33 program.
34
35
36 @node Command-line usage
37 @section Command-line usage
38
39 This section contains extra information about using LilyPond on the
40 command-line.  This may be desirable to pass extra options to the
41 program.  In addition, there are certain extra @q{helper} programs (such
42 as @code{midi2ly}) which are only available on the command-line.
43
44 By @q{command-line}, we mean the command line in the operating system.
45 Windows users might be more familiar with the terms @q{DOS shell} or
46 @q{command shell}.  MacOS@tie{}X users might be more familiar with the terms
47 @q{terminal} or @q{console}.  Some additional setup is required
48 for MacOS@tie{}X users; please see @rweb{MacOS X}.
49
50 Describing how to use this part of an operating system is outside the
51 scope of this manual; please consult other documentation on this topic
52 if you are unfamiliar with the command-line.
53
54 @menu
55 * Invoking lilypond::
56 * Command line options for lilypond::
57 * Environment variables::
58 * LilyPond in chroot jail::
59 @end menu
60
61 @node Invoking lilypond
62 @unnumberedsubsec Invoking @command{lilypond}
63
64 The @command{lilypond} executable may be called as follows from
65 the command line.
66
67 @example
68 lilypond [@var{option}]@dots{} @var{file}@dots{}
69 @end example
70
71
72 When invoked with a filename that has no extension, the @file{.ly}
73 extension is tried first.  To read input from stdin, use a
74 dash (@code{-}) for @var{file}.
75
76 When @file{filename.ly} is processed it will produce @file{filename.ps}
77 and @file{filename.pdf} as output.  Several files can be specified;
78 they will each be processed independently.  @footnote{The status of
79 GUILE is not reset after processing a @code{.ly} file, so be careful
80 not to change any system defaults from within Scheme.}
81
82 If @file{filename.ly} contains more than one @code{\book}
83 block, then the rest of the scores will be output in numbered files,
84 starting with @file{filename-1.pdf}.  In addition, the value of
85 @code{output-suffix} will be inserted between the basename and the
86 number.  An input file containing
87
88 @example
89 #(define output-suffix "violin")
90 \score @{ @dots{} @}
91 #(define output-suffix "cello")
92 \score @{ @dots{} @}
93 @end example
94
95 @noindent
96 will output @var{base}@file{-violin.pdf} and
97 @var{base}@file{-cello-1.pdf}.
98
99
100 @node Command line options for lilypond
101 @unnumberedsubsec Command line options for @command{lilypond}
102
103 @cindex Invoking @command{lilypond}
104 @cindex command line options for @command{lilypond}
105 @cindex options, command line
106 @cindex switches
107
108 The following options are supported:
109
110 @table @code
111
112 @item -e,--evaluate=@var{expr}
113 Evaluate the Scheme @var{expr} before parsing any @file{.ly} files.
114 Multiple @code{-e} options may be given, they will be evaluated
115 sequentially.
116
117 The expression will be evaluated in the @code{guile-user} module, so
118 if you want to use definitions in @var{expr}, use
119
120 @example
121 lilypond -e '(define-public a 42)'
122 @end example
123
124 @noindent
125 on the command-line, and include
126
127 @example
128 #(use-modules (guile-user))
129 @end example
130
131 @noindent
132 at the top of the @code{.ly} file.
133
134 @item -f,--format=@var{format}
135 which formats should be written.  Choices for @code{format} are
136 @code{ps}, @code{pdf}, and @code{png}.
137
138 Example: @code{lilypond -fpng @var{filename}.ly}
139
140
141
142 @item -d,--define-default=@var{var}=@var{val}
143 This sets the internal program option @var{var} to the Scheme value
144 @var{val}.  If @var{val} is not supplied, then @var{#t} is used.  To
145 switch off an option, @code{no-} may be prefixed to @var{var}, e.g.
146
147 @cindex point and click, command line
148
149 @example
150 -dno-point-and-click
151 @end example
152
153 @noindent
154 is the same as
155 @example
156 -dpoint-and-click='#f'
157 @end example
158
159 Here are a few interesting options.
160
161 @cindex help, command line
162
163 @table @samp
164 @item help
165 Running @code{lilypond -dhelp} will print all of the @code{-d} options
166 available.
167
168 @cindex paper-size, command line
169
170 @item paper-size
171 This option sets the default paper-size,
172 @example
173 -dpaper-size=\"letter\"
174 @end example
175
176 @noindent
177 Note that the string must be enclosed in escaped quotes ( @code{\"} ).
178 @c Match " in previous line to help context-sensitive editors
179
180 @cindex safe, command line
181
182 @item safe
183 Do not trust the @code{.ly} input.
184
185 When LilyPond formatting is available through a web server, either the
186 @code{--safe} or the @code{--jail} option @b{MUST} be passed.  The
187 @code{--safe} option will prevent inline Scheme code from wreaking
188 havoc, for example
189
190 @quotation
191 @verbatim
192 #(system "rm -rf /")
193 {
194   c4^#(ly:export (ly:gulp-file "/etc/passwd"))
195 }
196 @end verbatim
197 @end quotation
198
199 The @code{-dsafe} option works by evaluating in-line Scheme
200 expressions in a special safe module.  This safe module is derived from
201 GUILE @file{safe-r5rs} module, but adds a number of functions of the
202 LilyPond API.  These functions are listed in @file{scm/@/safe@/-lily@/.scm}.
203
204 In addition, safe mode disallows @code{\include} directives and
205 disables the use of backslashes in @TeX{} strings.
206
207 In safe mode, it is not possible to import LilyPond variables
208 into Scheme.
209
210 @code{-dsafe} does @emph{not} detect resource overuse.  It is still possible to
211 make the program hang indefinitely, for example by feeding cyclic data
212 structures into the backend.  Therefore, if using LilyPond on a
213 publicly accessible webserver, the process should be limited in both
214 CPU and memory usage.
215
216 The safe mode will prevent many useful LilyPond snippets from being
217 compiled.  The @code{--jail} is a more secure alternative, but
218 requires more work to set up.
219
220 @cindex output format, setting
221 @item backend
222 the output format to use for the back-end.  Choices for @code{format} are
223 @table @code
224 @item ps
225 @cindex PostScript output
226  for PostScript.
227
228   Postscript files include TTF, Type1 and OTF fonts.  No subsetting of
229   these fonts is done.  When using oriental character sets, this can
230   lead to huge files.
231
232 @item eps
233
234 @cindex Postscript, encapsulated
235 @cindex EPS (Encapsulated PostScript)
236
237  for encapsulated PostScript.  This dumps every page (system) as a separate
238 @file{EPS} file, without fonts, and as one collated @file{EPS} file with
239 all pages (systems) including fonts.
240
241 This mode is used by default by @command{lilypond-book}.
242
243 @item svg
244
245 @cindex SVG (Scalable Vector Graphics)
246
247  for SVG (Scalable Vector Graphics).
248
249  This creates a single SVG file, without embedded fonts, for every
250  page of output.  It is recommended to install the Century
251  Schoolbook fonts, included with your LilyPond installation, for
252  optimal rendering.  Under UNIX, simply copy these fonts from the
253  LilyPond directory (typically
254  @file{/usr/share/lilypond/VERSION/fonts/otf/}) to
255  @file{~/.fonts/}.  The SVG output should be compatible with any
256  SVG editor or user agent.
257
258 @item scm
259
260 @cindex Scheme dump
261
262  for a dump of the raw, internal Scheme-based drawing commands.
263
264 @item null
265  do not output a printed score; has the same effect as @code{-dno-print-pages}.
266 @end table
267
268 Example: @code{lilypond -dbackend=svg @var{filename}.ly}
269
270 @item preview
271 @cindex preview, command line
272 Generate an output file containing the titles and the first system
273 of music.  If @code{\bookpart} blocks are used, the titles and
274 first system of every @code{\bookpart} will appear in the output.
275 The @code{ps}, @code{eps}, and @code{svg} backends support this
276 option.
277
278 @item print-pages
279 Generate the full pages, the default.  @code{-dno-print-pages} is
280 useful in combination with @code{-dpreview}.
281
282 @end table
283
284
285
286 @item -h,--help
287 Show a summary of usage.
288
289 @item -H,--header=@var{FIELD}
290 Dump a header field to file @file{BASENAME.@var{FIELD}}.
291
292 @cindex file searching
293 @cindex search path
294 @item --include, -I=@var{directory}
295 Add @var{directory} to the search path for input files.
296
297 Multiple -I options may be given.  The search will start in the
298 first defined directory, and if the file to be included is not
299 found the search will continue in subsequent directories.
300
301 @item -i,--init=@var{file}
302 Set init file to @var{file} (default: @file{init.ly}).
303
304 @cindex folder, directing output to
305 @cindex output filename, setting
306
307 @item -o,--output=@var{FILE} or @var{FOLDER}
308 Set the default output file to @var{FILE} or, if a folder with
309 that name exists, direct the output to @var{FOLDER}, taking the
310 file name from the input file.  The appropriate suffix will be
311 added (e.g. @code{.pdf} for pdf) in both cases.
312
313
314 @cindex PostScript output
315
316 @item --ps
317 Generate PostScript.
318
319 @cindex Portable Network Graphics (PNG) output
320
321 @item --png
322 Generate pictures of each page, in PNG format.  This implies
323 @code{--ps}.  The resolution in DPI of the image may be set with
324 @example
325 -dresolution=110
326 @end example
327
328 @cindex Portable Document Format (PDF) output
329
330 @item --pdf
331 Generate PDF.  This implies @code{--ps}.
332
333
334
335 @item -j,--jail=@var{user},@var{group},@var{jail},@var{dir}
336 Run @command{lilypond} in a chroot jail.
337
338 The @code{--jail} option provides a more flexible alternative to
339 @code{--safe} when LilyPond formatting is available through a web
340 server or whenever LilyPond executes externally provided
341 sources.
342
343 The @code{--jail} option works by changing the root of @command{lilypond} to
344 @var{jail} just before starting the actual compilation process.  The user
345 and group are then changed to match those provided, and the current
346 directory is changed to @var{dir}.  This setup guarantees that it is not
347 possible (at least in theory) to escape from the jail.  Note that for
348 @code{--jail} to work @command{lilypond} must be run as root, which is usually
349 accomplished in a safe way using @command{sudo}.
350
351 Setting up a jail is a slightly delicate matter, as we must be sure that
352 LilyPond is able to find whatever it needs to compile the source
353 @emph{inside the jail}.  A typical setup comprises the following items:
354
355 @table @asis
356 @item Setting up a separate filesystem
357 A separate filesystem should be created for LilyPond, so that it can be
358 mounted with safe options such as @code{noexec}, @code{nodev}, and
359 @code{nosuid}.  In this way, it is impossible to run executables or to
360 write directly to a device from LilyPond.  If you do not want to create a
361 separate partition, just create a file of reasonable size and use it to
362 mount a loop device.  A separate filesystem also guarantees that LilyPond
363 cannot write more space than it is allowed.
364
365 @item Setting up a separate user
366 A separate user and group (say, @code{lily}/@code{lily}) with low
367 privileges should be used to run LilyPond inside the jail.  There should
368 be a single directory writable by this user, which should be passed in
369 @var{dir}.
370
371 @item Preparing the jail
372 LilyPond needs to read a number of files while running.  All these files
373 are to be copied into the jail, under the same path they appear in the
374 real root filesystem.  The entire content of the LilyPond installation
375 (e.g., @file{/usr/share/lilypond})
376 should be copied.
377
378 If problems arise, the simplest way to trace them down is to run
379 LilyPond using @command{strace}, which will allow you to determine which
380 files are missing.
381
382 @item Running LilyPond
383 In a jail mounted with @code{noexec} it is impossible to execute any external
384 program.  Therefore LilyPond must be run with a backend that does not
385 require any such program.  As we already mentioned, it must be also run
386 with superuser privileges (which, of course, it will lose immediately),
387 possibly using @command{sudo}.  It is a good idea to limit the number of
388 seconds of CPU time LilyPond can use (e.g., using @command{ulimit
389 -t}), and, if your operating system supports it, the amount of memory
390 that can be allocated.
391 @end table
392
393
394 @item -v,--version
395 Show version information.
396
397 @item -V,--verbose
398 Be verbose: show full paths of all files read, and give timing
399 information.
400
401 @item -w,--warranty
402 Show the warranty with which GNU LilyPond comes.  (It comes with
403 @strong{NO WARRANTY}!)
404 @end table
405
406
407 @node Environment variables
408 @unnumberedsubsec Environment variables
409
410
411 @cindex LANG
412 @cindex LILYPOND_DATADIR
413
414 @command{lilypond} recognizes the following environment variables:
415 @table @code
416 @item LILYPOND_DATADIR
417 This specifies a directory where locale messages and
418 data files will be looked up by default.  The directory should contain
419 subdirectories called @file{ly/}, @file{ps/}, @file{tex/}, etc.
420
421 @item LANG
422 This selects the language for the warning messages.
423
424 @item LILYPOND_GC_YIELD
425 With this variable the memory footprint and performance can be
426 adjusted.  It is a percentage tunes memory management behavior.  With
427 higher values, the program uses more memory, with smaller values, it
428 uses more CPU time.  The default value is @code{70}.
429
430 @end table
431
432
433 @node LilyPond in chroot jail
434 @unnumberedsubsec LilyPond in chroot jail
435
436 Setting up the server to run LilyPond in a chroot jail is a complicated
437 task.  The steps are listed below.  Examples in the steps are from
438 Ubuntu Linux, and may require the use of @code{sudo} as appropriate.
439
440 @itemize
441
442 @item Install the necessary packages: LilyPond, GhostScript, and ImageMagick.
443
444 @item Create a new user by the name of @code{lily}:
445
446 @example
447 adduser lily
448 @end example
449
450 @noindent
451 This will create a new group for the @code{lily} user as well, and a home folder,
452 @code{/home/lily}
453
454 @item In the home folder of the @code{lily} user create a file to use as a
455 separate filesystem:
456
457 @example
458 dd if=/dev/zero of=/home/lily/loopfile bs=1k count= 200000
459 @end example
460
461 @noindent
462 This example creates a 200MB file for use as the jail filesystem.
463
464 @item Create a loop device, make a file system and mount it, then create
465 a folder that can be written by the @code{lily} user:
466
467 @example
468 mkdir /mnt/lilyloop
469 losetup /dev/loop0 /home/lily/loopfile
470 mkfs -t ext3 /dev/loop0 200000
471 mount -t ext3 /dev/loop0 /mnt/lilyloop
472 mkdir /mnt/lilyloop/lilyhome
473 chown lily /mnt/lilyloop/lilyhome
474 @end example
475
476 @item In the configuration of the servers, the JAIL will be @code{/mnt/lilyloop}
477 and the DIR will be @code{/lilyhome}.
478
479 @item Create a big directory tree in the jail by copying the necessary files, as
480 shown in the sample script below.
481
482 You can use @code{sed} to create the necessary copy commands for a given
483 executable:
484
485 @example
486 for i in "/usr/local/lilypond/usr/bin/lilypond" "/bin/sh" "/usr/bin/; do ldd $i | sed 's/.*=> \/\(.*\/\)\([^(]*\).*/mkdir -p \1 \&\& cp -L \/\1\2 \1\2/' | sed 's/\t\/\(.*\/\)\(.*\) (.*)$/mkdir -p \1 \&\& cp -L \/\1\2 \1\2/' | sed '/.*=>.*/d'; done
487 @end example
488
489 @end itemize
490
491 @subheading Example script for 32-bit Ubuntu 8.04
492
493 @example
494 #!/bin/sh
495 ## defaults set here
496
497 username=lily
498 home=/home
499 loopdevice=/dev/loop0
500 jaildir=/mnt/lilyloop
501 # the prefix (without the leading slash!)
502 lilyprefix=usr/local
503 # the directory where lilypond is installed on the system
504 lilydir=/$lilyprefix/lilypond/
505
506 userhome=$home/$username
507 loopfile=$userhome/loopfile
508 adduser $username
509 dd if=/dev/zero of=$loopfile bs=1k count=200000
510 mkdir $jaildir
511 losetup $loopdevice $loopfile
512 mkfs -t ext3 $loopdevice 200000
513 mount -t ext3 $loopdevice $jaildir
514 mkdir $jaildir/lilyhome
515 chown $username $jaildir/lilyhome
516 cd $jaildir
517
518 mkdir -p bin usr/bin usr/share usr/lib usr/share/fonts $lilyprefix tmp
519 chmod a+w tmp
520
521 cp -r -L $lilydir $lilyprefix
522 cp -L /bin/sh /bin/rm bin
523 cp -L /usr/bin/convert /usr/bin/gs usr/bin
524 cp -L /usr/share/fonts/truetype usr/share/fonts
525
526 # Now the library copying magic
527 for i in "$lilydir/usr/bin/lilypond" "$lilydir/usr/bin/guile" "/bin/sh" "/bin/rm" "/usr/bin/gs" "/usr/bin/convert"; do ldd $i | sed 's/.*=> \/\(.*\/\)\([^(]*\).*/mkdir -p \1 \&\& cp -L \/\1\2 \1\2/' | sed 's/\t\/\(.*\/\)\(.*\) (.*)$/mkdir -p \1 \&\& cp -L \/\1\2 \1\2/' | sed '/.*=>.*/d'; done | sh -s
528
529 # The shared files for ghostscript...
530       cp -L -r /usr/share/ghostscript usr/share
531 # The shared files for ImageMagick
532       cp -L -r /usr/lib/ImageMagick* usr/lib
533
534 ### Now, assuming that you have test.ly in /mnt/lilyloop/lilyhome, you should be able to run:
535 ### Note that /$lilyprefix/bin/lilypond is a script, which sets the LD_LIBRARY_PATH - this is crucial
536       /$lilyprefix/bin/lilypond -jlily,lily,/mnt/lilyloop,/lilyhome test.ly
537 @end example
538
539
540 @node Error messages
541 @section Error messages
542
543 @cindex error messages
544 Different error messages can appear while compiling a file:
545
546 @table @emph
547
548 @item Warning
549 @cindex warning
550 Something looks suspect.  If you are requesting something out of the
551 ordinary then you will understand the message, and can ignore it.
552 However, warnings usually indicate that something is wrong with the
553 input file.
554
555 @item Error
556 @cindex error
557 Something is definitely wrong.  The current processing step (parsing,
558 interpreting, or formatting) will be finished, but the next step will
559 be skipped.
560
561 @item Fatal error
562 @cindex fatal error
563 Something is definitely wrong, and LilyPond cannot continue.  This
564 happens rarely.  The most usual cause is misinstalled fonts.
565
566 @item Scheme error
567 @cindex trace, Scheme
568 @cindex call trace
569 @cindex Scheme error
570 Errors that occur while executing Scheme code are caught by the Scheme
571 interpreter.  If running with the verbose option (@code{-V} or
572 @code{--verbose}) then a call trace of the offending
573 function call is printed.
574
575 @item Programming error
576 @cindex Programming error
577 There was some internal inconsistency.  These error messages are
578 intended to help the programmers and debuggers.  Usually, they can be
579 ignored.  Sometimes, they come in such big quantities that they obscure
580 other output.
581
582 @item Aborted (core dumped)
583 @cindex Aborted (core dumped)
584 This signals a serious programming error that caused the program to
585 crash.  Such errors are considered critical.  If you stumble on one,
586 send a bug-report.
587 @end table
588
589 @cindex errors, message format
590 If warnings and errors can
591 be linked to some part of the input file, then error messages have the
592 following form
593
594 @example
595 @var{filename}:@var{lineno}:@var{columnno}: @var{message}
596 @var{offending input line}
597 @end example
598
599 A line-break is inserted in the offending line to indicate the column
600 where the error was found.  For example,
601
602 @example
603 test.ly:2:19: error: not a duration: 5
604   @{ c'4 e'
605            5 g' @}
606 @end example
607
608 These locations are LilyPond's best guess about where the warning or
609 error occurred, but (by their very nature) warnings and errors occur
610 when something unexpected happens.  If you can't see an error in the
611 indicated line of your input file, try checking one or two lines
612 above the indicated position.
613
614 More information about errors is given in @ref{Common errors}.
615
616
617 @node Common errors
618 @section Common errors
619
620 The error conditions described below occur often, yet the cause
621 is not obvious or easily found.  Once seen and understood, they
622 are easily handled.
623
624
625 @menu
626 * Music runs off the page::
627 * An extra staff appears::
628 * Apparent error in ../ly/init.ly::
629 * Error message Unbound variable %::
630 * Error message FT_Get_Glyph_Name::
631 @end menu
632
633 @node Music runs off the page
634 @unnumberedsubsec Music runs off the page
635
636 Music running off the page over the right margin or appearing
637 unduly compressed is almost always due to entering an incorrect
638 duration on a note, causing the final note in a measure to extend
639 over the bar line.  It is not invalid if the final note in a
640 measure does not end on the automatically entered bar line, as the
641 note is simply assumed to carry over into the next measure.  But
642 if a long sequence of such carry-over measures occurs the music
643 can appear compressed or may flow off the page because automatic
644 line breaks can be inserted only at the end of complete measures,
645 i.e., where all notes end before or at the end of the measure.
646
647 @warning{An incorrect duration can cause line breaks to be
648 inhibited, leading to a line of highly compressed music or
649 music which flows off the page.}
650
651 The incorrect duration can be found easily if bar checks are used,
652 see @ruser{Bar and bar number checks}.
653
654 If you actually intend to have a series of such carry-over measures
655 you will need to insert an invisible bar line where you want the
656 line to break.  For details, see @ruser{Bar lines}.
657
658
659 @node An extra staff appears
660 @unnumberedsubsec An extra staff appears
661
662 If contexts are not created explicitly with @code{\new} or
663 @code{\context}, they will be silently created as soon as a
664 command is encountered which cannot be applied to an existing
665 context.  In simple scores the automatic creation of contexts is
666 useful, and most of the examples in the LilyPond manuals take
667 advantage of this simplification.  But occasionally the silent
668 creation of contexts can give rise to unexpected new staves or
669 scores.  For example, it might be expected that the following code
670 would cause all note heads within the following staff to be
671 colored red, but in fact it results in two staves with the note
672 heads remaining the default black in the lower staff.
673
674 @lilypond[quote,verbatim,relative=2]
675 \override Staff.NoteHead #'color = #red
676 \new Staff { a }
677 @end lilypond
678
679 This is because a @code{Staff} context does not exist when the
680 override is processed, so one is implicitly created and the override
681 is applied to it, but then the @code{\new Staff} command creates
682 another, separate, staff into which the notes are placed.  The
683 correct code to color all note heads red is
684
685 @lilypond[quote,verbatim,relative=2]
686 \new Staff {
687   \override Staff.NoteHead #'color = #red
688   a
689 }
690 @end lilypond
691
692 As a second example, if a @code{\relative} command is placed inside
693 a @code{\repeat} command, two staves result, the second offset from
694 the first, because the @code{\repeat} command generates two
695 @code{\relative} blocks, which each implicitly create @code{Staff}
696 and @code{Voice} blocks.
697
698 @lilypond[quote,verbatim]
699 \repeat unfold 2 {
700   \relative c' { c4 d e f }
701 }
702 @end lilypond
703
704 Explicitly instantiating the @code{Voice} context fixes the
705 problem:
706
707 @lilypond[quote,verbatim]
708 \new Voice {
709   \repeat unfold 2 {
710     \relative c' { c4 d e f }
711   }
712 }
713 @end lilypond
714
715
716 @node Apparent error in ../ly/init.ly
717 @unnumberedsubsec Apparent error in @code{../ly/init.ly}
718
719 Various obscure error messages may appear about syntax errors in
720 @code{../ly/init.ly} if the input file is not correctly formed,
721 for example, if it does not contain correctly
722 matched braces or quote signs.
723
724 The most common error is a missing brace, (@code{@}}), at the end of
725 a @code{score} block.  Here the solution is obvious: check the
726 @code{score} block is correctly terminated.  The correct structure
727 of an input file is described in @rlearning{How LilyPond input files work}.
728 Using an editor which automatically highlights matching brackets and
729 braces is helpful to avoid such errors.
730
731 A second common cause is no white space between the last syllable
732 of a lyrics block and the terminating brace, (@code{@}}).  Without
733 this separation the brace is taken to be part of the syllable.  It
734 is always advisable to ensure there is white space before and after
735 @emph{every} brace.  For the importance of this when using lyrics,
736 see @ruser{Lyrics explained}.
737
738 This error message can also appear if a terminating quote sign,
739 (@code{"}), is omitted.  In this case an accompanying error message
740 @c keep "-matching straight in fancy editors
741 should give a line number close to the line in error.  The
742 mismatched quote will usually be on the line one or two above.
743
744 @node Error message Unbound variable %
745 @unnumberedsubsec Error message Unbound variable %
746
747 This error message will appear at the bottom of the console
748 output or log file together with a @qq{GUILE signalled an error ...}
749 message every time a Scheme routine is called which (invalidly)
750 contains a @emph{LilyPond} rather than a @emph{Scheme} comment.
751
752 LilyPond comments begin with a percent sign, (@code{%}), and must
753 not be used within Scheme routines.  Scheme comments begin with a
754 semi-colon, (@code{;}).
755
756 @node Error message FT_Get_Glyph_Name
757 @unnumberedsubsec Error message FT_Get_Glyph_Name
758
759 This error messages appears in the console output or log file if
760 an input file contains a non-ASCII character and was not saved in
761 UTF-8 encoding.  For details, see @ruser{Text encoding}.
762
763
764