]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/point-and-click.itely
(LY_DEFINE): deprecate
[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
7
8 @cindex source specials
9 @cindex specials, source
10
11 Point and click lets you find notes in the input by clicking on them
12 in the PDF viewer.  This makes it easier to find input that causes
13 some error in the sheet music.
14
15 When this functionality is active, LilyPond adds hyperlinks to the PDF
16 file. These hyperlinks are sent to the web-browser, which opens a
17 text-editor with the cursor in the right place. 
18
19 To make this chain work, the following should done:
20
21 @itemize @bullet
22
23 @item
24 The PDF viewer must be configured for following hyperlinks, preferably
25 using Mozilla Firefox.
26
27 For Xpdf on Unix, the following should be present in
28 @file{xpdfrc}@footnote{On unix, this file is found either in
29 @file{/etc} or your home directory.}
30
31 @example
32 urlCommand     "firefox -remote 'OpenURL(%s)'"
33 @end example
34
35 @item Your web-browser must be configured for the @code{textedit}
36 protocol,
37
38 For Mozilla and Mozilla Firefox, this is done by adding following
39 lines to the @file{prefs.js}@footnote{On a typical unix system, this
40 file is found in your home-directory under
41 @file{.mozilla/firefox/default.trn/prefs.js}.}  
42
43 @example
44 user_pref("network.protocol-handler.app.textedit", "lilypond-pdfpc-helper");
45 user_pref("network.protocol-handler.warn-external.textedit", false);
46 @end example
47
48 @end itemize
49
50 The program @file{lilypond-pdfpc-helper} is a small helper program.
51 It tests the environment variable @code{EDITOR} for the following
52 patterns,
53
54 @table @code
55 @item emacs
56   this will invoke
57 @example
58 emacsclient --no-wait +@var{line}:@var{column} @var{file}
59 @end example
60 @item vim
61   this will invoke
62 @example
63 gvim --remote +:@var{line}:norm@var{column} @var{file}
64 @end example
65
66 @item nedit
67 @example
68   nc -noask +@var{line} @var{file}'
69 @end example
70 @end table
71
72 The environment variable @code{LYEDITOR} is used to override this. It
73 contains the command line to start the editor, where @code{%(file)s},
74 @code{%(column)s}, @code{%(line)s} is replaced with the file, column
75 and line respectively. The  setting
76
77 @example
78 emacsclient --no-wait +%(line)s:%(column)s %(file)s
79 @end example
80
81 @noindent
82 for @code{LYEDITOR} is equivalent to the standard emacsclient
83 invocation.
84