[ << External programs ] | [Top][Contents][Index][ ? ] | [ Suggestions for writing files >> ] | ||
[ < External programs ] | [ Up : External programs ] | [ Enabling point and click > ] |
4.1 Point and click
Point and click adds links to pdf documents for certain music elements.
Enabling point and click | ||
Selective point-and-click |
[ << External programs ] | [Top][Contents][Index][ ? ] | [ Suggestions for writing files >> ] | ||
[ < Point and click ] | [ Up : Point and click ] | [ Selective point-and-click > ] |
Enabling point and click
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.
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.
To make this chain work, you should configure your PDF viewer to follow hyperlinks using the ‘lilypond-invoke-editor’ script supplied with LilyPond.
For Xpdf on UNIX, the following should be present in ‘xpdfrc’. On UNIX, this file is found either in ‘/etc/xpdfrc’ or as ‘$HOME/.xpdfrc’.
urlCommand "lilypond-invoke-editor %s"
The program ‘lilypond-invoke-editor’ is a small helper
program. It will invoke an editor for the special textedit
URIs, and run a web browser for others. It tests the environment
variable EDITOR
for the following patterns,
-
emacs
this will invoke
emacsclient --no-wait +line:column file
-
gvim
this will invoke
gvim --remote +:line:normcolumn file
-
nedit
this will invoke
nc -noask +line file'
The environment variable LYEDITOR
is used to override this. It
contains the command line to start the editor, where %(file)s
,
%(column)s
, %(line)s
is replaced with the file, column
and line respectively. The setting
emacsclient --no-wait +%(line)s:%(column)s %(file)s
for LYEDITOR
is equivalent to the standard emacsclient
invocation.
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
\pointAndClickOff
in a ‘.ly’ file. Point and click may be explicitly enabled with
\pointAndClickOn
Alternately, you may disable point and click with a command-line option:
lilypond -dno-point-and-click file.ly
Note: You should always turn off point and click in any LilyPond files to be distributed to avoid including path information about your computer in the .pdf file, which can pose a security risk.
[ << External programs ] | [Top][Contents][Index][ ? ] | [ Suggestions for writing files >> ] | ||
[ < Enabling point and click ] | [ Up : Point and click ] | [ Text editor support > ] |
Selective point-and-click
For some interactive applications, it may be desirable to only include certain point-and-click items. For example, if somebody wanted to create an application which played audio or video starting from a particular note, it would be awkward if clicking on the note produced the point-and-click location for an accidental or slur which occurred over that note.
This may be controlled by indicating which events to include:
-
Hard-coded in the ‘.ly’ file:
\pointAndClickTypes #'note-event \relative c' { c2\f( f) }
or
#(ly:set-option 'point-and-click 'note-event) \relative c' { c2\f( f) }
-
Command-line:
lilypond -dpoint-and-click=note-event example.ly
Multiple events can be included:
-
Hard-coded in the ‘.ly’ file:
\pointAndClickTypes #'(note-event dynamic-event) \relative c' { c2\f( f) }
or
#(ly:set-option 'point-and-click '(note-event dynamic-event)) \relative c' { c2\f( f) }
-
Command-line:
lilypond \ -e"(ly:set-option 'point-and-click '(note-event dynamic-event))" \ example.ly
[ << External programs ] | [Top][Contents][Index][ ? ] | [ Suggestions for writing files >> ] | ||
[ < Enabling point and click ] | [ Up : Point and click ] | [ Text editor support > ] |
Other languages: deutsch, español, français, magyar, italiano, 日本語.
About automatic language selection.