commit 233a65234cbe4d8a85b9dbf276562f128c5603d9
parent 175881e5a57cbcda9f9258db8d9eb217f85a93c6
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Mon, 5 Jan 2009 10:20:17 +0000
use define-unsafer for ffi/objc; fix more teachpack doc latex-output problems
svn: r13008
original commit: c2857c1b7ce7cc1dde3cbfeb0e0175b422a2138c
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss
@@ -4,6 +4,7 @@
mzlib/class
scheme/runtime-path
scheme/port
+ scheme/path
scheme/string
setup/main-collects)
(provide render-mixin)
@@ -18,6 +19,11 @@
(define-runtime-path scribble-tex "scribble.tex")
+(define (gif-to-png p)
+ (if (equal? (filename-extension p) #"gif")
+ (path-replace-suffix p #".png")
+ p))
+
(define (render-mixin %)
(class %
(init-field [style-file #f]
@@ -194,7 +200,7 @@
(void)
(let ([fn (install-file
(main-collects-relative->path
- (image-file-path style)))])
+ (gif-to-png (image-file-path style))))])
(printf "\\includegraphics[scale=~a]{~a}"
(image-file-scale style) fn)))]
[else (super render-element e part ri)])))