]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/running.itely
Fix off-by-one error in constrained-breaking.
[lilypond.git] / Documentation / user / running.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond.tely
3
4 @node Running LilyPond
5 @chapter Running LilyPond
6
7 This chapter details the technicalities of running LilyPond.
8
9 Some of these commands are run from the command-line.  By
10 ``command-line'', we mean the command
11 line in the operating system.  Windows users
12 might be more familiar with the terms ``DOS shell'' or
13 ``command shell''; OSX users might be more familiar with the
14 terms ``terminal'' or ``console''.  OSX users should also
15 consult @ref{Notes for the MacOS X app}.
16
17 Describing how to use
18 this part of an operating system is outside the scope of this
19 manual; please consult other documentation on this topic if
20 you are unfamiliar with the command-line.
21
22 @menu
23 * Invoking lilypond::           
24 * Notes for the MacOS X app::   
25 * Updating files with convert-ly::  
26 * Reporting bugs::              
27 * Error messages::              
28 * Editor support::              
29 * Point and click::             
30 @end menu
31
32 @node Invoking lilypond
33 @section Invoking lilypond
34 @cindex Invoking LilyPond
35 @cindex command line options
36 @cindex options, command line
37 @cindex switches
38
39
40 The @code{lilypond} executable may be called as follows from the command line.
41
42 @example
43 lilypond [@var{option}]@dots{} @var{file}@dots{}
44 @end example
45
46
47 When invoked with a filename that has no extension, the @file{.ly}
48 extension is tried first.  To read input from stdin, use a
49 dash (@code{-}) for @var{file}.
50
51 When @file{filename.ly} is processed it will produce
52 @file{filename.tex} as output (or @file{filename.ps} for PostScript
53 output).  If @file{filename.ly} contains more than one @code{\score}
54 block, then the rest of the scores will be output in numbered files,
55 starting with @file{filename-1.tex}.  Several files can be specified;
56 they will each be processed independently.  @footnote{The status of
57 GUILE is not reset after processing a @code{.ly} file, so be careful
58 not to change any system defaults from within Scheme.}
59
60
61 @subsection Command line options
62
63 The following options are supported:
64
65 @table @code
66
67 @item -e,--evaluate=@var{expr}
68 Evaluate the Scheme @var{expr} before parsing any @file{.ly} files.
69 Multiple @code{-e} options may be given, they will be evaluated
70 sequentially.
71
72 The expression will be evaluated in the @code{guile-user} module, so
73 if you want to use definitions in @var{expr}, use
74
75 @example
76 lilypond -e '(define-public a 42)'
77 @end example
78
79 @noindent
80 on the command-line, and include
81
82 @example
83 #(use-modules (guile-user))
84 @end example
85
86 @noindent
87 at the top of the @code{.ly} file.
88
89 @item -f,--format=@var{format}
90 which formats should be written.  Choices are @code{svg}, @code{ps},
91 @code{pdf}, @code{png}, @code{tex}, @code{dvi}.
92
93 @item -b,--backend=@var{format}
94 the output format to use for the back-end.  Choices are
95 @table @code
96 @item tex
97 for @TeX{} output, to be processed with La@TeX{}.  If present, the file
98 @file{file.textmetrics} is read to determine text extents.
99 @item texstr
100 dump text strings to @file{.texstr} file, which can be run through
101 (La)@TeX{}, resulting in a @code{.textmetrics} file, which contains the
102 extents of strings of text.  @strong{Warning:} this functionality is
103 currently missing due to heavy restructuring of the source code.
104 @item ps
105  for PostScript.
106 @cindex PostScript output
107
108   Postscript files include TTF, Type1 and OTF fonts.  No subsetting of
109   these fonts is done.  When using oriental character sets, this can
110   lead to huge files.
111
112 @item eps
113  for encapsulated PostScript.  This dumps every page (system) as a separate
114 @file{EPS} file, without fonts, and as one collated @file{EPS} file with
115 all pages (systems) including fonts.
116
117 This mode is used by default by lilypond-book.
118
119 @item svg
120  for SVG (Scalable Vector Graphics).  This dumps every page as a separate
121 @file{SVG} file, with embedded fonts.
122 @cindex SVG (Scalable Vector Graphics)
123   You need a SVG viewer which supports embedded fonts, or a SVG
124   viewer which is able to replace the embedded fonts with OTF fonts.
125   Under Unix, you may use @uref{http://www.inkscape.org,Inkscape}
126   (version 0.42 or later), after copying the OTF fonts in directory
127   @file{PATH/TO/share/lilypond/VERSION/fonts/otf/} to @file{~/.fonts/}.
128 @item scm
129  for a dump of the raw, internal Scheme-based drawing commands.
130 @cindex Scheme dump
131 @end table
132
133 @cindex output format, setting
134
135 @item -d,--define-default=@var{var}=@var{val}
136 This sets the internal program option @var{var} to the Scheme value
137 @var{val}. If @var{val} is not supplied, then @var{#t} is used. To
138 switch off an option, @code{no-} may be prefixed to @var{var}, e.g.
139
140 @cindex point and click, command line
141
142 @example
143 -dno-point-and-click
144 @end example
145
146 @noindent
147 is the same as
148 @example
149 -dpoint-and-click='#f'
150 @end example
151
152 Another notable option is
153
154 @example
155 -dpaper-size=\"letter\"
156 @end example
157
158 @noindent
159 Note that the string must be enclosed in escaped quotes ( @code{\"} ).
160
161 Setting the @code{-dhelp} option will print a summary of the options
162 available, and exit.
163
164 @item -h,--help
165 Show a summary of usage.
166
167 @item -H,--header=FIELD
168 Dump a header field to file BASENAME.FIELD
169
170 @item --include, -I=@var{directory}
171 Add @var{directory} to the search path for input files.
172 @cindex file searching
173 @cindex search path
174
175 @item -i,--init=@var{file}
176 Set init file to @var{file} (default: @file{init.ly}).
177
178 @item -o,--output=@var{FILE}
179 Set the default output file to @var{FILE}.  The appropriate
180 suffix will be added (ie @code{.pdf} for pdf, @code{.tex}
181 for tex, etc).
182
183 @item --ps
184 Generate PostScript.
185
186 @item --dvi
187 Generate DVI files.  In this case, the @TeX{} backend should be
188 specified, i.e., @code{-b tex}.
189
190 @item --png
191 Generate pictures of each page, in PNG format.  This implies
192 @code{--ps}.  The resolution in DPI of the image may be set with
193 @example
194 -dresolution=110
195 @end example
196
197 @item --pdf
198 Generate PDF.  This implies @code{--ps}.
199
200 @item --preview
201 Generate an output file containing the titles and the first system
202
203 @item --no-pages
204 Do not generate the full pages.  Useful in combination with
205 @code{--preview}.
206
207 @item -s,--safe
208 Do not trust the @code{.ly} input.
209
210 When LilyPond formatting is available through a web server, either the
211 @code{--safe} or the @code{--jail} option @b{MUST} be passed.  The
212 @code{--safe} option will prevent inline Scheme code from wreaking
213 havoc, for example
214
215 @quotation
216 @verbatim
217 #(system "rm -rf /")
218 {
219   c4^#(ly:export (ly:gulp-file "/etc/passwd"))
220 }
221 @end verbatim
222 @end quotation
223
224 The @code{--safe} option works by evaluating in-line Scheme
225 expressions in a special safe module.  This safe module is derived from
226 GUILE @file{safe-r5rs} module, but adds a number of functions of the
227 LilyPond API.  These functions are listed in @file{scm/@/safe@/-lily@/.scm}.
228
229 In addition, @code{--safe} disallows @code{\include} directives and
230 disables the use of backslashes in @TeX{} strings.
231
232 In @code{--safe} mode, it is not possible to import LilyPond variables
233 into Scheme.
234
235 @code{--safe} does @emph{not} detect resource overuse.  It is still
236 possible to make the program hang indefinitely, for example by feeding
237 cyclic data structures into the backend.  Therefore, if using LilyPond
238 on a publicly accessible webserver, the process should be limited in
239 both CPU and memory usage.
240
241 Note that @code{--safe} will prevent many useful LilyPond snippets from
242 being compiled.  For a softer but secure alternative you can use the
243 @code{--jail} option.
244
245
246 @item -j,--jail=@var{user},@var{group},@var{jail},@var{dir}
247 Run LilyPond in a chroot jail.
248
249 The @code{--jail} option provides a more flexible alternative to
250 @code{--safe} when LilyPond formatting is available through a web
251 server or whenever LilyPond executes externally provided
252 sources.
253
254 The @code{--jail} option works by changing the root of LilyPond to
255 @var{jail} just before starting the actual compilation process.  The user
256 and group are then changed to match those provided, and the current
257 directory is changed to @var{dir}.  This setup guarantees that it is not
258 possible (at least in theory) to escape from the jail.  Note that for
259 @code{--jail} to work LilyPond must be run as root, which is usually
260 accomplished in a safe way using @command{sudo}.
261
262 Setting up a jail is a slightly delicate matter, as we must be sure that
263 LilyPond is able to find whatever it needs to compile the source
264 @emph{inside the jail}. A typical setup comprises the following items:
265
266 @table @asis
267 @item Setting up a separate filesystem
268 A separate filesystem should be created for LilyPond, so that it can be
269 mounted with safe options such as @code{noexec}, @code{nodev}, and
270 @code{nosuid}.  In this way, it is impossible to run executables or to
271 write directly to a device from LilyPond.  If you do not want to create a
272 separate partition, just create a file of reasonable size and use it to
273 mount a loop device.  A separate filesystem also guarantees that LilyPond
274 cannot write more space than it is allowed.
275
276 @item Setting up a separate user
277 A separate user and group (say, @samp{lily}/@samp{lily}) with low
278 privileges should be used to run LilyPond inside the jail.  There should
279 be a single directory writable by this user, which should be passed in
280 @var{dir}.
281
282 @item Preparing the jail
283 LilyPond needs to read a number of files while running.  All these files
284 are to be copied into the jail, under the same path they appear in the
285 real root filesystem.  The entire content of the LilyPond installation
286 (e.g., @file{/usr/share/lilypond})
287 should be copied.
288
289 If problems arise, the simplest way to trace them down is to run
290 LilyPond using @command{strace}, which will allow you to determine which
291 files are missing.
292
293 @item Running LilyPond
294 In a jail mounted with @code{noexec} it is impossible to execute any external
295 program.  Therefore LilyPond must be run with a backend that does not
296 require any such program.  As we already mentioned, it must be also run
297 with superuser privileges (which, of course, it will lose immediately),
298 possibly using @command{sudo}.  It is a good idea to limit the number of
299 seconds of CPU time LilyPond can use (e.g., using @command{ulimit
300 -t}), and, if your operating system supports it, the amount of memory
301 that can be allocated.
302 @end table
303
304
305 @item -v,--version
306 Show version information.
307
308 @item -V,--verbose
309 Be verbose: show full paths of all files read, and give timing
310 information.
311
312 @item -w,--warranty
313 Show the warranty with which GNU LilyPond comes. (It comes with
314 @strong{NO WARRANTY}!)
315 @end table
316
317
318 @subsection Environment variables
319
320
321 @cindex LANG
322 @cindex LILYPONDPREFIX
323
324 @code{Lilypond} recognizes the following environment variables:
325 @table @code
326 @item LILYPONDPREFIX
327 This specifies a directory where locale messages and
328 data files will be looked up by default.  The directory should contain
329 subdirectories called @file{ly/}, @file{ps/}, @file{tex/}, etc.
330
331 @item LANG
332 This selects the language for the warning messages.
333
334 @item LILYPOND_GC_YIELD
335 With this variable the memory footprint and performance can be
336 adjusted. It is a percentage tunes memory management behavior. With
337 higher values, the program uses more memory, with smaller values, it
338 uses more CPU time. The default value is @code{70}.
339
340 @end table
341
342
343 @node Notes for the MacOS X app
344 @section Notes for the MacOS X app
345
346 The scripts (such as lilypond-book, convert-ly, abc2ly, and even
347 lilypond itself) are also
348 included inside MacOS X .app. They can be run from the command line by
349 invoking them directly, e.g.
350
351 @example
352 @var{path/to}/LilyPond.app/Contents/Resources/bin/lilypond
353 @end example
354
355 @noindent
356 The same is true of the other scripts in that directory, including
357 lilypond-book, convert-ly, abc2ly, etc.
358
359 Alternatively, you may add this directory to your path.  Modify (or create)
360 a file called @code{.profile} in your home directory such that it contains
361
362 @example
363 export PATH=$PATH:@var{path/to}/LilyPond.app/Contents/Resources/bin
364 @end example
365
366 @noindent
367 This file should end with a blank line.
368
369 Note that @var{path/to} will generally be @code{/Applications/}.
370
371
372 @node Updating files with convert-ly
373 @section Updating with @command{convert-ly}
374
375 @cindex Updating a LilyPond file
376 @funindex convert-ly
377
378 The LilyPond input syntax is routinely changed to simplify it or improve
379 it in different ways.  As a side effect of this, the LilyPond interpreter
380 often is no longer compatible with older input files.  To remedy this,
381 the program @command{convert-ly} can be used to deal with most of the
382 syntax changes between LilyPond versions.
383
384 It uses @code{\version} statements in the input files to detect the
385 old version number.  In most cases, to upgrade your input file it is
386 sufficient to run@footnote{MacOS X users may execute this command
387 under the menu entry @samp{Compile > Update syntax}.}
388
389 @example
390 convert-ly -e myfile.ly
391 @end example
392
393 If there are no changes to myfile.ly and file called myfile.ly.NEW
394 is created, then myfile.ly is already updated.
395
396 @command{convert-ly} always converts up to the last syntax change handled by
397 it.  This means that the @code{\version} number left in the file is
398 usually lower than the version of @command{convert-ly} itself.
399
400 To upgrade LilyPond fragments in texinfo files, use
401
402 @example
403 convert-ly --from=... --to=... --no-version *.itely
404 @end example
405
406 To upgrade many files at once, combine @code{convert-ly} with
407 standard unix commands.  This example will upgrade all @code{.ly}
408 files in the current directory
409
410 @example
411 for f in *.ly; do convert-ly -e $f; done;
412 @end example
413
414 In general, the program is invoked as follows:
415
416 @example
417 convert-ly [@var{option}]@dots{} @var{file}@dots{}
418 @end example
419
420
421 The following options can be given:
422
423 @table @code
424 @item -e,--edit
425 Do an inline edit of the input file.  Overrides @code{--output}.
426
427 @item -f,--from=@var{from-patchlevel}
428 Set the version to convert from.  If this is not set, @command{convert-ly}
429 will guess this, on the basis of @code{\version} strings in the file.
430
431 @item -n,--no-version
432 Normally, @command{convert-ly} adds a @code{\version} indicator
433 to the output.  Specifying this option suppresses this.
434
435 @item -s, --show-rules
436 Show all known conversions and exit.
437
438 @item --to=@var{to-patchlevel}
439 Set the goal version of the conversion.  It defaults to the latest
440 available version.
441
442 @item -h, --help
443 Print usage help.
444 @end table
445
446
447 @refbugs
448
449 Not all language changes are handled.  Only one output option can be
450 specified.  Automatically updating scheme and lilypond scheme
451 interfaces is quite unlikely; be prepared to tweak scheme code
452 manually.
453
454
455 @c  We might want to make this a completely new section, along with more
456 @c  info about how to upgrade old input files.  -gp
457
458 @ignore
459 Copy and paste from CVS, last updated
460 Aug 18, 2005
461
462 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/lilypond/lily-bugs/bugs/
463 convert-ly.txt?rev=HEAD&content-type=text/plain
464
465 NEW: not exactly copied; this list has been modified.  Since we're
466 changing the bug system, it doesn't make sense to copy from
467 the bug CVS any more.  I'll figure out something else.  -gp
468 @end ignore
469 @verbatim
470
471 There are a few things that the convert-ly cannot handle. Here's a list of
472 limitations
473 that the community has complained about.
474
475 This bug report structure has been chosen because convert-ly has a structure
476 that doesn't
477 allow to smoothly implement all needed changes. Thus this is just a wishlist,
478 placed
479 here for reference.
480
481 1.6->2.0:
482  Doesn't always convert figured bass correctly, specifically things like {<
483 >}. Mats' comment on working around this:
484    To be able to run convert-ly
485    on it, I first replaced all occurencies of '{<' to some dummy like '{#'
486    and similarly I replaced '>}' with '&}'. After the conversion, I could
487    then change back from '{ #' to '{ <' and from '& }' to '> }'.
488  Doesn't convert all text markup correctly. In the old markup syntax,
489  it was possible to group a number of markup commands together within
490 parentheses, e.g.
491    -#'((bold italic) "string")
492    This will incorrectly be converted into
493    -\markup{{\bold italic} "string"}
494    instead of the correct
495    -\markup{\bold \italic "string"}
496 2.0->2.2:
497  Doesn't handle \partcombine
498  Doesn't do \addlyrics => \lyricsto, this breaks some scores with multiple
499 stanzas.
500 2.0->2.4:
501  \magnify isn't changed to \fontsize.
502     - \magnify #m => \fontsize #f, where f = 6ln(m)/ln(2)
503  remove-tag isn't changed.
504     - \applyMusic #(remove-tag '. . .) => \keepWithTag #'. . .
505  first-page-number isn't changed.
506     - first-page-number no => print-first-page-number = ##f
507  Line breaks in header strings aren't converted.
508     - \\\\  as line break in \header strings => \markup \center-align <
509       "First Line" "Second Line" >
510  Crescendo and decrescendo terminators aren't converted.
511     - \rced => \!
512     - \rc => \!
513 2.2->2.4:
514  \turnOff (used in \set Staff.VoltaBracket = \turnOff) is not properly
515 converted.
516 2.4.2->2.5.9
517  \markup{ \center-align <{ ... }> } should be converted to:
518  \markup{ \center-align {\line { ... }} }
519  but now, \line is missing.
520 2.4->2.6
521  Special LaTeX characters such as $~$ in text are not converted to UTF8.
522 2.8
523  \score{} must now begin with a music expression.  Anything else
524  (particularly \header{}) must come after the music.
525 @end verbatim
526
527
528 @node Reporting bugs
529 @section Reporting bugs
530
531 @cindex bugs
532 @cindex reporting bugs
533
534 If you have input that results in a crash or an erroneous output, then
535 that is a bug.  We try to respond to bug-reports promptly, and fix them as
536 soon as possible.  Help us by sending a defective input file, so we can
537 reproduce the problem. Send the report via:
538
539 @example
540 @uref{http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs}
541 @end example
542
543 A few tips:
544 @itemize @bullet
545
546 @item Try to produce a very small input file which demonstrates the problem;
547 one or two bars is often sufficient to reproduce a bug. The smaller the
548 input file is, the easier it is for us to debug the problem.
549
550 @item Don't forget to tell which version of LilyPond you use!
551
552 @item If possible, use @code{ragged-right} in your example. This makes sure
553 that the bug can be reproduced in all paper sizes.
554 @end itemize
555
556 @ignore
557 @c the bug database is not up to date enough.
558
559 When you've found a bug, have a look at our
560 @uref{http://@/lilypond@/.org/@/bugs/@/v2.8/@/,bug database} to see if
561 it has already been reported.  You could also try to do a few searches
562 on the mailing list for the bug.  Sometimes the bug will have already
563 been reported and a fix or workaround is already known.
564 @end ignore
565
566 Here is an example of a good bug report:
567
568 @verbatim
569 It seems that placement of accidentals is broken.  In the
570 following example, the accidental touches the note head.
571
572 Using Mac OSX 10.3.7, lilypond 2.7.32
573
574 \version "2.9.13"
575 \layout { ragged-right = ##t }
576 \relative c'' {
577    a4 b cis d
578 }
579 @end verbatim
580
581 @lilypond[quote]
582 \layout { ragged-right = ##t }
583 \relative c''{
584   \override Accidental #'extra-offset = #'(1.0 . 0)
585   a4 b cis d
586 }
587 @end lilypond
588
589 @node Error messages
590 @section Error messages
591
592 @cindex error messages
593 Different error messages can appear while compiling a file:
594
595 @table @emph
596 @cindex warning
597
598 @item Warning
599 Something looks suspect.  If you are requesting something out of the
600 ordinary then you will understand the message, and can ignore it.
601 However, warnings usually indicate that something is wrong with the
602 input file.
603
604 @item Error
605 Something is definitely wrong.  The current processing step (parsing,
606 interpreting, or formatting) will be finished, but the next step will
607 be skipped.
608
609 @cindex error
610 @cindex fatal error
611 @item Fatal error
612 Something is definitely wrong, and LilyPond cannot continue.  This
613 happens rarely.  The most usual cause is misinstalled fonts.
614
615 @cindex trace, Scheme
616 @cindex call trace
617 @cindex Scheme error
618 @item Scheme error
619 Errors that occur while executing Scheme code are caught by the Scheme
620 interpreter.  If running with the verbose option (@code{-V} or
621 @code{--verbose}) then a call trace of the offending
622 function call is printed.
623
624 @cindex Programming error
625 @item Programming error
626 There was some internal inconsistency.  These error messages are
627 intended to help the programmers and debuggers.  Usually, they can be
628 ignored.  Sometimes, they come in such big quantities that they obscure
629 other output.  In this case, file a bug-report.
630
631 @item Aborted (core dumped)
632 This signals a serious programming error that caused the program to
633 crash.  Such errors are considered critical.  If you stumble on one,
634 send a bug-report.
635
636
637 @end table
638
639 @cindex errors, message format
640 If warnings and errors can
641 be linked to some part of the input file, then error messages have the
642 following form
643
644 @example
645 @var{filename}:@var{lineno}:@var{columnno}: @var{message}
646 @var{offending input line}
647 @end example
648
649 A line-break is inserted in the offending line to indicate the column
650 where the error was found.  For example,
651
652 @example
653 test.ly:2:19: error: not a duration: 5:
654   @{ c'4 e'5
655              g' @}
656 @end example
657
658 These locations are LilyPond's best guess about where the warning or
659 error occurred, but (by their very nature) warnings and errors occur
660 when something unexpected happens.  If you can't see an error in the
661 indicated line of your input file, try checking one or two lines
662 above the indicated position.
663
664
665 @node Editor support
666 @section Editor support
667
668 @cindex editors
669 @cindex vim
670 @cindex emacs
671 @cindex modes, editor
672 @cindex syntax coloring
673 @cindex coloring, syntax
674
675 There is support from different editors for LilyPond.
676
677 @table @asis
678 @item Emacs
679 Emacs has a @file{lilypond-mode}, which provides keyword
680 autocompletion, indentation, LilyPond specific parenthesis matching
681 and syntax coloring, handy compile short-cuts and reading LilyPond
682 manuals using Info.  If @file{lilypond-mode} is not installed on your
683 platform, then read the
684 @ifhtml
685 @uref{source/Documentation/topdocs/INSTALL.html,installation instructions}.
686 @end ifhtml
687 @ifnothtml
688 installation instructions.
689 @end ifnothtml
690
691 @item VIM
692
693 For @uref{http://@/www@/.vim@/.org,VIM}, a @file{vimrc} is supplied, along
694 with syntax coloring tools.  For more information, refer to the
695 @ifhtml
696 @uref{source/Documentation/topdocs/INSTALL.html,installation instructions}.
697 @end ifhtml
698 @ifnothtml
699 installation instructions.
700 @end ifnothtml
701
702
703 @item JEdit
704
705 The @uref{http://@/www@/.jedit@/.org@/,jEdit} editor has a LilyPond plugin.
706 This plugin includes a DVI viewer, integrated help and viewing via
707 GhostScript.  It can be installed by doing @key{Plugins > Plugin
708 Manager}, and selecting @code{LilyTool} from the @key{Install} tab.
709
710 @end table
711
712 All these editors can be made to jump into the input file to the source
713 of a symbol in the graphical output.  See @ref{Point and click}.
714
715
716 @node Point and click
717 @section Point and click
718 @cindex point and click
719
720
721 Point and click lets you find notes in the input by clicking on them
722 in the PDF viewer.  This makes it easier to find input that causes
723 some error in the sheet music.
724
725 When this functionality is active, LilyPond adds hyperlinks to the PDF
726 file. These hyperlinks are sent to the web-browser, which opens a
727 text-editor with the cursor in the right place.
728
729 To make this chain work, you should configure your PDF viewer to
730 follow hyperlinks using the @file{lilypond-invoke-editor} script
731 supplied with LilyPond.
732
733 For Xpdf on Unix, the following should be present in
734 @file{xpdfrc}@footnote{On unix, this file is found either in
735 @file{/etc/xpdfrc} or as @file{.xpdfrc} in your home directory.}
736
737 @example
738 urlCommand     "lilypond-invoke-editor %s"
739 @end example
740
741 The program @file{lilypond-invoke-editor} is a small helper
742 program. It will invoke an editor for the special @code{textedit}
743 URIs, and run a web browser for others.  It tests the environment
744 variable @code{EDITOR} for the following patterns,
745
746 @table @code
747 @item emacs
748   this will invoke
749 @example
750 emacsclient --no-wait +@var{line}:@var{column} @var{file}
751 @end example
752 @item vim
753   this will invoke
754 @example
755 gvim --remote +:@var{line}:norm@var{char} @var{file}
756 @end example
757
758 @item nedit
759 this will invoke
760 @example
761   nc -noask +@var{line} @var{file}'
762 @end example
763 @end table
764
765 The environment variable @code{LYEDITOR} is used to override this. It
766 contains the command line to start the editor, where @code{%(file)s},
767 @code{%(column)s}, @code{%(line)s} is replaced with the file, column
768 and line respectively. The  setting
769
770 @example
771 emacsclient --no-wait +%(line)s:%(column)s %(file)s
772 @end example
773
774 @noindent
775 for @code{LYEDITOR} is equivalent to the standard emacsclient
776 invocation.
777
778
779 @cindex file size, output
780
781 The point and click links enlarge the output files significantly. For
782 reducing the size of PDF and PS files, point and click may be switched
783 off by issuing
784
785 @example
786 #(ly:set-option 'point-and-click #f)
787 @end example
788
789 @noindent
790 in a @file{.ly} file.  Alternately, you may pass this as an command-line
791 option
792
793 @example
794 lilypond -dno-point-and-click file.ly
795 @end example
796