]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/point-and-click.itely
* Documentation/user/point-and-click.itely: simplify p&c
[lilypond.git] / Documentation / user / point-and-click.itely
1 @node Point and click
2 @appendix Point and click
3 @cindex point and click
4
5
6 Point and click lets you find notes in the input by clicking on them
7 in the PDF viewer.  This makes it easier to find input that causes
8 some error in the sheet music.
9
10 When this functionality is active, LilyPond adds hyperlinks to the PDF
11 file. These hyperlinks are sent to the web-browser, which opens a
12 text-editor with the cursor in the right place. 
13
14 To make this chain work, you should configure your PDF viewer to
15 follow hyperlinks using the @file{lilypond-invoke-editor} script
16 supplied with LilyPond.
17
18 For Xpdf on Unix, the following should be present in
19 @file{xpdfrc}@footnote{On unix, this file is found either in
20 @file{/etc/xpdfrc} or as @file{.xpdfrc} in your home directory.}
21
22 @example
23 urlCommand     "lilypond-invoke-editor %s"
24 @end example
25
26 The program @file{lilypond-invoke-editor} is a small helper
27 program. It will invoke an editor for the special @code{textedit}
28 URIs, and run a web browser for others.  It tests the environment
29 variable @code{EDITOR} for the following patterns,
30
31 @table @code
32 @item emacs
33   this will invoke
34 @example
35 emacsclient --no-wait +@var{line}:@var{column} @var{file}
36 @end example
37 @item vim
38   this will invoke
39 @example
40 gvim --remote +:@var{line}:norm@var{char} @var{file}
41 @end example
42
43 @item nedit
44 this will invoke
45 @example
46   nc -noask +@var{line} @var{file}'
47 @end example
48 @end table
49
50 The environment variable @code{LYEDITOR} is used to override this. It
51 contains the command line to start the editor, where @code{%(file)s},
52 @code{%(column)s}, @code{%(line)s} is replaced with the file, column
53 and line respectively. The  setting
54
55 @example
56 emacsclient --no-wait +%(line)s:%(column)s %(file)s
57 @end example
58
59 @noindent
60 for @code{LYEDITOR} is equivalent to the standard emacsclient
61 invocation.
62
63
64 @cindex file size, output
65
66 The point and click links enlarge the output files significantly. For
67 reducing the size of PDF and PS files, point and click may be switched
68 off by issuing
69
70 @example
71 #(ly:set-option 'point-and-click #f)
72 @end example
73
74 @noindent
75 in a @file{.ly} file.  Alternately, you may pass this as an command-line
76 option
77
78 @example
79 lilypond -dno-point-and-click file.ly
80 @end example
81