X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fuser%2Fpoint-and-click.itely;h=8d74e79a68a81364a241a186b0d955ce8615865e;hb=fd918b1b7326c387a9680c22ef2802c37ee1ed4c;hp=f099513e4b200f4f2179e2f32ca0845746eebea5;hpb=fb90bcfab9e7d98b572dcac3f8b80d82282b3ae4;p=lilypond.git diff --git a/Documentation/user/point-and-click.itely b/Documentation/user/point-and-click.itely index f099513e4b..8d74e79a68 100644 --- a/Documentation/user/point-and-click.itely +++ b/Documentation/user/point-and-click.itely @@ -2,116 +2,80 @@ @appendix Point and click @cindex point and click -@cindex source specials -@cindex specials, source -Point and click lets you find notes in the input by clicking on them in -the Xdvi window. This makes it easier to find input that causes some -error in the sheet music. +Point and click lets you find notes in the input by clicking on them +in the PDF viewer. This makes it easier to find input that causes +some error in the sheet music. -To use it, you need the following software: -@itemize @bullet -@item a dvi viewer that supports src specials. +When this functionality is active, LilyPond adds hyperlinks to the PDF +file. These hyperlinks are sent to the web-browser, which opens a +text-editor with the cursor in the right place. -The most obvious choice is Xdvi@footnote{KDVI also provides src -@cindex Xdvi -@cindex KDVI -@cindex KDE -specials, but does not use the kpathsea library, so it cannot find -LilyPond font and PostScript library files.}, version 22.36 or newer. -It is available from -@uref{ftp://ftp.math.berkeley.edu/pub/Software/TeX/xdvi.tar.gz,ftp.math.berkeley.edu}. +To make this chain work, you should configure your PDF viewer to +follow hyperlinks using the @file{lilypond-invoke-editor} script +supplied with LilyPond. - Most @TeX{} distributions ship with xdvik, which is always a few -versions behind the official Xdvi. To find out which Xdvi you are -running, try @code{xdvi -version} or @code{xdvi.bin -version}. +For Xpdf on Unix, the following should be present in +@file{xpdfrc}@footnote{On unix, this file is found either in +@file{/etc/xpdfrc} or as @file{.xpdfrc} in your home directory.} -@item an editor with a client/server interface (or a lightweight GUI -editor): - -@cindex editor - -@itemize @bullet -@item Emacs. Emacs is an extensible text-editor. It is available from -@uref{http://www.gnu.org/software/emacs/}. You need version 21 to use -column location. - -@c move this elsewhere? - - -@cindex Emacs -@cindex Emacs mode -@cindex lilypond-mode for Emacs -@cindex syntax coloring +@example +urlCommand "lilypond-invoke-editor %s" +@end example -@item XEmacs. XEmacs is very similar to Emacs. +The program @file{lilypond-invoke-editor} is a small helper +program. It will invoke an editor for the special @code{textedit} +URIs, and run a web browser for others. It tests the environment +variable @code{EDITOR} for the following patterns, -@cindex XEmacs +@table @code +@item emacs + this will invoke +@example +emacsclient --no-wait +@var{line}:@var{column} @var{file} +@end example +@item vim + this will invoke +@example +gvim --remote +:@var{line}:norm@var{char} @var{file} +@end example -@item NEdit. NEdit runs under Windows, and Unix. - It is available from @uref{http://www.nedit.org}. +@item nedit +this will invoke +@example + nc -noask +@var{line} @var{file}' +@end example +@end table -@cindex NEdit +The environment variable @code{LYEDITOR} is used to override this. It +contains the command line to start the editor, where @code{%(file)s}, +@code{%(column)s}, @code{%(line)s} is replaced with the file, column +and line respectively. The setting -@item GVim. GVim is a GUI variant of VIM, the popular VI -clone. It is available from @uref{http://www.vim.org}. +@example +emacsclient --no-wait +%(line)s:%(column)s %(file)s +@end example -@cindex GVim -@cindex Vim +@noindent +for @code{LYEDITOR} is equivalent to the standard emacsclient +invocation. -@end itemize -@end itemize +@cindex file size, output -Xdvi must be configured to find the @TeX{} fonts and music -fonts. Refer to the Xdvi documentation for more information. +The point and click links enlarge the output files significantly. For +reducing the size of PDF and PS files, point and click may be switched +off by issuing -To use point-and-click, add one of these lines to the top of your .ly -file: @example -#(ly:set-point-and-click 'line) +#(ly:set-option 'point-and-click #f) @end example -@cindex line-location -When viewing, Control-Mousebutton 1 will take you to the originating -spot in the @file{.ly} file. Control-Mousebutton 2 will show all -clickable boxes. +@noindent +in a @file{.ly} file. Alternately, you may pass this as an command-line +option -If you correct large files with point-and-click, be sure to start -correcting at the end of the file. When you start at the top, and -insert one line, all following locations will be off by a line. - -@cindex Emacs -For using point-and-click with Emacs, add the following -In your Emacs startup file (usually @file{~/.emacs}): @example -(server-start) +lilypond -dno-point-and-click file.ly @end example -Make sure that the environment variable @var{XEDITOR} is set to -@example -emacsclient --no-wait +%l %f -@end example -@cindex @var{XEDITOR} -If you use XEmacs instead of Emacs, you use @code{(gnuserve-start)} in -your @file{.emacs}, and set @code{XEDITOR} to @code{gnuclient -q +%l %f}. - -For using Vim, set @code{XEDITOR} to @code{gvim --remote +%l %f}, or -use this argument with Xdvi's @code{-editor} option. - -@cindex NEdit -For using NEdit, set @code{XEDITOR} to @code{nc -noask +%l %f}, or -use this argument with Xdvi's @code{-editor} option. - -If can also make your editor jump to the exact location of the note -you clicked. This is only supported on Emacs and VIM. Users of Emacs version -20 must apply the patch @file{emacsclient.patch}. Users of version 21 -must apply @file{server.el.patch} (version 21.2 and earlier). At the -top of the @code{ly} file, replace the @code{set-point-and-click} line -with the following line: -@example -#(ly:set-point-and-click 'line-column) -@end example -@cindex line-column-location -and set @code{XEDITOR} to @code{emacsclient --no-wait +%l:%c %f}. Vim -users can set @var{XEDITOR} to @code{gvim --remote +:%l:norm%c| %f}.