+2005-02-27 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * ps/music-drawing-routines.ps (mark_file_line): Switch Action
+ based on pdf-viewer setting.
+
+ * scm/framework-ps.scm (write-preamble): Find and set preferred
+ pdf-viewer.
+
2005-02-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
* scripts/lilypond-pdfpc-helper.py: new file. Invoke different
/Rect [ llx lly urx ury ]
/Border [ 0 0 0 0 ]
- %% following for xpdf
-% /Action /Launch
-% /File command
-
- %% following for acroread
- /Action <<
- /Subtype /URI
- /URI command
- >>
-
+ pdf-viewer (acroread) eq
+ {
+ /Action
+ <<
+ /Subtype /URI
+ /URI command
+ >>
+ }
+ {
+ % xpdf. FIXME: gpdf, kpdf etc?
+ /Action
+ <<
+ /Launch
+ /File command
+ >>
+ } ifelse
/Subtype /Link
/ANN
pdfmark
}
bind def
-/set_tex_dimen {
+/set_tex_dimen
+{
cvr def
} bind def
""))))
(filter string? font-names))))
pfas))
-
+ ;; FIXME: user preference, somehow?
+ (define (pdf-viewer)
+ (define (find-alternative path lst)
+ (let ((command (search-path path (car lst))))
+ (if (or command (null? lst)) command
+ (find-alternative path (cdr lst)))))
+ (let ((path (parse-path (getenv "PATH")))
+ (pdf-viewers '("acroread" "gpdf" "kpdf" "xpdf" "gv" "echo")))
+ (find-alternative path pdf-viewers)))
+
+ (format port "/pdf-viewer (~a) def\n" (basename (pdf-viewer)))
(display (procset "music-drawing-routines.ps") port)
(display (procset "lilyponddefs.ps") port)
(if load-fonts?