diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt index ab8da3cc..5f0757a8 100644 --- a/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt +++ b/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt @@ -6,13 +6,14 @@ "decode-struct.rkt" "html-properties.rkt" "tag.rkt" + "parameters.rkt" scheme/list scheme/class racket/contract/base racket/contract/combinator (for-syntax scheme/base)) -(provide (all-from-out "tag.rkt")) +(provide (all-from-out "tag.rkt" "parameters.rkt")) ;; ---------------------------------------- diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt index 3e6b6ee3..b440664e 100644 --- a/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt +++ b/pkgs/scribble-pkgs/scribble-lib/scribble/html-render.rkt @@ -1,5 +1,4 @@ #lang scheme/base - (require "core.rkt" "private/render-utils.rkt" "html-properties.rkt" @@ -1092,7 +1091,8 @@ (cond [(string? e) (super render-content e part ri)] ; short-cut for common case [(list? e) (super render-content e part ri)] ; also a short-cut - [(and (convertible? e) + [(and (equal? (current-html-render-pict-as) 'png) + (convertible? e) (convert e 'png-bytes)) => (lambda (bstr) (let ([w (integer-bytes->integer (subbytes bstr 16 20) #f #t)] @@ -1101,6 +1101,13 @@ [alt "image"] [width ,(number->string w)] [height ,(number->string h)])))))] + [(and (equal? (current-html-render-pict-as) 'svg) + (convertible? e) + (convert e 'svg-bytes)) + => (lambda (bstr) + `((object + ([data ,(install-file "pict.svg" bstr)] + [type "image/svg+xml"]))))] [(image-element? e) (let* ([src (collects-relative->path (image-element-path e))] [suffixes (image-element-suffixes e)]