]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/point-and-click.itely
a4d58320d773503401f1332d2c8649b5d77f9aa1
[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, the following should done:
15
16 @itemize @bullet
17
18 @item
19 The PDF viewer must be configured for following hyperlinks, preferably
20 using Mozilla Firefox.
21
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.}
25
26 @example
27 urlCommand     "firefox -remote 'OpenURL(%s)'"
28 @end example
29
30 @item Your web-browser must be configured for the @code{textedit}
31 protocol,
32
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}
39 and
40 @uref{http://@/www@/.mozilla@/.org@/support@/firefox@/edit#profile,profile}.}
41
42 @ignore
43 mozilla wants us do store this in user.js:
44
45 location on different systems:
46
47 @end ignore
48
49 @example
50 user_pref("network.protocol-handler.app.textedit", "lilypond-invoke-editor");
51 user_pref("network.protocol-handler.warn-external.textedit", false);
52 @end example
53
54 @end itemize
55
56 The program @file{lilypond-invoke-editor} is a small helper program.
57 It tests the environment variable @code{EDITOR} for the following
58 patterns,
59
60 @table @code
61 @item emacs
62   this will invoke
63 @example
64 emacsclient --no-wait +@var{line}:@var{column} @var{file}
65 @end example
66 @item vim
67   this will invoke
68 @example
69 gvim --remote +:@var{line}:norm@var{char} @var{file}
70 @end example
71
72 @item nedit
73 this will invoke
74 @example
75   nc -noask +@var{line} @var{file}'
76 @end example
77 @end table
78
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
83
84 @example
85 emacsclient --no-wait +%(line)s:%(column)s %(file)s
86 @end example
87
88 @noindent
89 for @code{LYEDITOR} is equivalent to the standard emacsclient
90 invocation.
91
92
93 @cindex file size, output
94
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
97 off by issuing
98
99 @example
100 #(ly:set-option 'point-and-click #f)
101 @end example
102
103 @noindent
104 in a @file{.ly} file.  Alternately, you may pass this as an command-line
105 option
106
107 @example
108 lilypond -dno-point-and-click file.ly
109 @end example
110