From: Carl Sorensen Date: Wed, 13 Aug 2008 13:46:33 +0000 (-0600) Subject: Add \pointAndClick[Off, On] X-Git-Tag: release/2.11.56-1~2^2~11^2~3^2~8 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=102788f3ca0539b887031989fe8619163f5b7e61;p=lilypond.git Add \pointAndClick[Off, On] --- diff --git a/Documentation/user/setup.itely b/Documentation/user/setup.itely index 1daccd6b6d..daf89d72c6 100644 --- a/Documentation/user/setup.itely +++ b/Documentation/user/setup.itely @@ -282,14 +282,23 @@ reducing the size of PDF and PS files, point and click may be switched off by issuing @example -#(ly:set-option 'point-and-click #f) +\pointAndClickOff @end example @noindent -in a @file{.ly} file. Alternately, you may pass this as an command-line -option +in a @file{.ly} file. Point and click may be explicitly enabled with + +@example +\pointAndClickOn +@end example + +Alternately, you may disable point and click with a command-line +option: @example lilypond -dno-point-and-click file.ly @end example +@warning{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.} diff --git a/ly/property-init.ly b/ly/property-init.ly index 0ed5d49f5b..c0d43eb980 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -349,3 +349,10 @@ predefinedFretboardsOn = { \set FretBoards.predefinedDiagramTable = #fretboard-table } +pointAndClickOff = #(define-music-function (parser location) () + (ly:set-option 'point-and-click #f) + (make-music 'SequentialMusic 'void #t)) + +pointAndClickOn = #(define-music-function (parser location) () + (ly:set-option 'point-and-click #t) + (make-music 'SequentialMusic 'void #t))