optional image scale
svn: r9140 original commit: d1ed1a1e52efcd8c0baa17ace233f2572611b4e1
This commit is contained in:
parent
f531e51b90
commit
649d3e94fe
|
@ -163,7 +163,7 @@
|
||||||
#f)]
|
#f)]
|
||||||
[(image-file? style)
|
[(image-file? style)
|
||||||
(let ([fn (install-file (image-file-path style))])
|
(let ([fn (install-file (image-file-path style))])
|
||||||
(printf "\\includegraphics{~a}" fn))]
|
(printf "\\includegraphics[scale=~a]{~a}" (image-file-scale style) fn))]
|
||||||
[else (super render-element e part ri)])))
|
[else (super render-element e part ri)])))
|
||||||
(when part-label?
|
(when part-label?
|
||||||
(printf "''"))
|
(printf "''"))
|
||||||
|
|
|
@ -257,14 +257,14 @@
|
||||||
|
|
||||||
;; String String *-> Element
|
;; String String *-> Element
|
||||||
;; an in-lined image, relative to the current directory
|
;; an in-lined image, relative to the current directory
|
||||||
(define (image filename-relative-to-source . alt)
|
(define (image #:scale [scale 1.0] filename-relative-to-source . alt)
|
||||||
(make-element
|
(make-element
|
||||||
(make-image-file filename-relative-to-source)
|
(make-image-file filename-relative-to-source scale)
|
||||||
(decode-content alt)))
|
(decode-content alt)))
|
||||||
|
|
||||||
(define (image/plain filename-relative-to-source . alt)
|
(define (image/plain filename-relative-to-source . alt)
|
||||||
(make-element
|
(make-element
|
||||||
(make-image-file filename-relative-to-source)
|
(make-image-file filename-relative-to-source 1.0)
|
||||||
(decode-content alt)))
|
(decode-content alt)))
|
||||||
|
|
||||||
(define (onscreen . str)
|
(define (onscreen . str)
|
||||||
|
|
|
@ -174,7 +174,8 @@
|
||||||
|
|
||||||
[target-url ([addr (or/c string? path?)][style any/c])]
|
[target-url ([addr (or/c string? path?)][style any/c])]
|
||||||
[url-anchor ([name string?])]
|
[url-anchor ([name string?])]
|
||||||
[image-file ([path path-string?])])
|
[image-file ([path path-string?]
|
||||||
|
[scale real?])])
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user