[racket] Generating svg-images rather than png-images from Scribble

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Mon Oct 14 20:02:00 EDT 2013

I gave this a try and I'm just getting "???" in the image docs. Below is my
change to the image library. Does anyone know where the ???s come from?

Robby

☕  git diff | cat
diff --git
a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl
b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl
index 8a625611..d66c922 100644
--- a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl
+++ b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl
@@ -12,7 +12,9 @@
           "img-eval.rkt"
           scribble/decode
           scribble/manual
-          scribble/eval)
+          scribble/eval
+          scribble/core
+          scribble/html-properties)

 @(define guide-eval (make-img-eval))

@@ -35,8 +37,8 @@
 @(interaction-eval #:eval guide-eval
                    (require racket/list racket/local))

-
- at title[#:tag "image-guide"]{Image Guide}
+ at title[#:style (style "svg" (list (render-pict-as 'svg-images)))
+               #:tag "image-guide"]{Image Guide}

 This section introduces the @racketmodname[2htdp/image] library
 through a series of increasingly complex image constructions
diff --git
a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl
b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl
index 9c7d447..6f3cb39 100644
--- a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl
+++ b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl
@@ -34,7 +34,7 @@
      (img-eval '(extra-margin 0))))


- at teachpack["image"]{Images}
+ at teachpack[#:svg? #t "image"]{Images}

 @(define mode/color-and-nitty-text
    (make-splice
diff --git a/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt
b/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt
index 82ade26..b2c1b40 100644
--- a/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt
+++ b/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt
@@ -1,12 +1,17 @@
 #lang racket/base

-(require scribble/manual)
+(require scribble/manual
+         scribble/core
+         scribble/html-properties)

 (provide teachpack
          beginner-require)

-(define (teachpack tp . name)
+(define (teachpack #:svg? [svg? #f] tp . name)
   (apply title #:tag tp
+         #:style (if svg?
+                     (style "svg" (list (render-pict-as 'svg-images)))
+                     #f)
          `(, at name ": " ,(filepath (format "~a.rkt" tp))
            ,(index (format "~a teachpack" tp)))))

☕  [robby at yanpu]
~/git/plt/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings
☕
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131014/d67656de/attachment.html>

Posted on the users mailing list.