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{user.js}@footnote{On a typical unix system, this
35 file exists or must be created in your home-directory as
36 @file{.mozilla/firefox/default.trn/user.js} or
37 @file{.firefox/default/xxxxxxxx.xxx/user.js},
38 see @uref{http://@/www@/.mozilla@/.org@/support@/firefox@/edit#user,location}
40 @uref{http://@/www@/.mozilla@/.org@/support@/firefox@/edit#profile,profile}.}
43 mozilla wants us do store this in user.js:
45 location on different systems:
50 user_pref("network.protocol-handler.app.textedit", "lilypond-invoke-editor");
51 user_pref("network.protocol-handler.warn-external.textedit", false);
56 The program @file{lilypond-invoke-editor} is a small helper program.
57 It tests the environment variable @code{EDITOR} for the following
64 emacsclient --no-wait +@var{line}:@var{column} @var{file}
69 gvim --remote +:@var{line}:norm@var{char} @var{file}
75 nc -noask +@var{line} @var{file}'
79 The environment variable @code{LYEDITOR} is used to override this. It
80 contains the command line to start the editor, where @code{%(file)s},
81 @code{%(column)s}, @code{%(line)s} is replaced with the file, column
82 and line respectively. The setting
85 emacsclient --no-wait +%(line)s:%(column)s %(file)s
89 for @code{LYEDITOR} is equivalent to the standard emacsclient
93 @cindex file size, output
95 The point and click links enlarge the output files significantly. For
96 reducing the size of PDF and PS files, point and click may be switched
100 #(ly:set-option 'point-and-click #f)
104 in a @file{.ly} file. Alternately, you may pass this as an command-line
108 lilypond -dno-point-and-click file.ly