]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/point-and-click.itely
(outside_slur_callback): try three sample points
[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 @cindex source specials
6 @cindex specials, source
7
8 Point and click lets you find notes in the input by clicking on them in
9 the Xdvi window. This makes it easier to find input that causes some
10 error in the sheet music.
11
12 To use it, you need the following software:
13 @itemize @bullet
14 @item a dvi viewer that supports src specials.
15
16 The most obvious choice is Xdvi@footnote{KDVI also provides src
17 @cindex Xdvi
18 @cindex KDVI
19 @cindex KDE
20 specials, but does not use the kpathsea library, so it cannot find
21 LilyPond font and PostScript library files.}, version 22.36 or newer.
22 It is available from
23 @uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,ftp.math.berkeley.edu}.
24
25    Most @TeX{} distributions ship with xdvik, which is always a few
26 versions behind the official Xdvi. To find out which Xdvi you are
27 running, try @code{xdvi -version} or @code{xdvi.bin -version}.
28
29 @item an editor with a client/server interface (or a lightweight GUI
30 editor):
31
32 @cindex editor
33
34 @itemize @bullet
35 @item Emacs. Emacs is an extensible text-editor.  It is available from
36 @uref{http://www.gnu.org/software/emacs/}.  You need version 21 to use
37 column location.
38
39 @c move this elsewhere?
40
41
42 @cindex Emacs
43 @cindex Emacs mode
44 @cindex lilypond-mode for Emacs
45 @cindex syntax coloring
46
47 @item XEmacs. XEmacs is very similar to Emacs.
48
49 @cindex XEmacs
50
51 @item NEdit.  NEdit runs under Windows, and Unix.
52   It is available from @uref{http://www.nedit.org}.
53
54 @cindex NEdit
55
56 @item GVim.  GVim is a GUI variant of VIM, the popular VI
57 clone.  It is available from @uref{http://www.vim.org}.
58
59 @cindex GVim
60 @cindex Vim
61
62 @end itemize
63 @end itemize
64
65
66 Xdvi must be configured to find the @TeX{} fonts and music
67 fonts. Refer to the Xdvi documentation for more information.
68
69 To use point-and-click, add one of these lines to the top of your .ly
70 file:
71 @example
72 #(ly:set-point-and-click 'line)
73 @end example
74 @cindex line-location
75
76 When viewing, Control-Mousebutton 1 will take you to the originating
77 spot in the @file{.ly} file.  Control-Mousebutton 2 will show all
78 clickable boxes.
79
80 If you correct large files with point-and-click, be sure to start
81 correcting at the end of the file. When you start at the top, and
82 insert one line, all following locations will be off by a line.
83
84 @cindex Emacs
85 For using point-and-click with Emacs,  add the following
86 In your Emacs startup file (usually @file{~/.emacs}):
87 @example
88 (server-start)
89 @end example
90
91 Make sure that the environment variable @var{XEDITOR} is set to
92 @example
93 emacsclient --no-wait +%l %f
94 @end example
95 @cindex @var{XEDITOR}
96 If you use XEmacs instead of Emacs, you use @code{(gnuserve-start)} in
97 your @file{.emacs}, and set @code{XEDITOR} to @code{gnuclient -q +%l %f}.
98
99 For using Vim, set @code{XEDITOR} to @code{gvim --remote +%l %f}, or
100 use this argument with Xdvi's @code{-editor} option.
101
102 @cindex NEdit
103 For using NEdit, set @code{XEDITOR} to @code{nc -noask +%l %f}, or
104 use this argument with Xdvi's @code{-editor} option.
105
106 If can also make your editor jump to the exact location of the note
107 you clicked. This is only supported on Emacs and VIM. Users of Emacs version
108 20 must apply the patch @file{emacsclient.patch}. Users of version 21
109 must apply @file{server.el.patch} (version 21.2 and earlier).  At the
110 top of the @code{ly} file, replace the @code{set-point-and-click} line
111 with the following line:
112 @example
113 #(ly:set-point-and-click 'line-column)
114 @end example
115 @cindex line-column-location
116 and set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}.  Vim
117 users can set @var{XEDITOR} to @code{gvim --remote +:%l:norm%c| %f}.