2 @appendix Point and click
3 @cindex point and click
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.
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.
14 To make this chain work, the following should done:
19 The PDF viewer must be configured for following hyperlinks, preferably
20 using Mozilla Firefox.
22 For Xpdf on Unix, the following should be present in
23 @file{xpdfrc}@footnote{On unix, this file is found either in
24 @file{/etc/xpdfrc} or as @file{.xpdfrc} in your home directory.}
27 urlCommand "firefox -remote 'OpenURL(%s)'"
30 @item Your web-browser must be configured for the @code{textedit}
33 For Mozilla and Mozilla Firefox, this is done by adding following
34 lines to the @file{prefs.js}@footnote{On a typical unix system, this
35 file is found in your home-directory under
36 @file{.mozilla/firefox/default.trn/prefs.js}.}
39 mozilla wants us do store this in user.js:
40 http://www.mozilla.org/support/firefox/edit#user
42 location on different systems:
43 http://www.mozilla.org/support/firefox/edit#profile
48 user_pref("network.protocol-handler.app.textedit", "lilypond-pdfpc-helper");
49 user_pref("network.protocol-handler.warn-external.textedit", false);
54 The program @file{lilypond-pdfpc-helper} is a small helper program.
55 It tests the environment variable @code{EDITOR} for the following
62 emacsclient --no-wait +@var{line}:@var{column} @var{file}
67 gvim --remote +:@var{line}:norm@var{column} @var{file}
73 nc -noask +@var{line} @var{file}'
77 The environment variable @code{LYEDITOR} is used to override this. It
78 contains the command line to start the editor, where @code{%(file)s},
79 @code{%(column)s}, @code{%(line)s} is replaced with the file, column
80 and line respectively. The setting
83 emacsclient --no-wait +%(line)s:%(column)s %(file)s
87 for @code{LYEDITOR} is equivalent to the standard emacsclient
91 @cindex file size, output
93 The point and click links enlarge the output files significantly. For
94 reducing the size of PDF and PS files, point and click may be switched
98 #(ly:set-option 'point-and-click #f)
102 in a @file{.ly} file. Alternately, you may pass this as an command-line
106 lilypond -e "(ly:set-option 'point-and-click #f)" file.ly