<div dir="ltr">Oh, and another thought: it appears that the 2htdp/image documentation just went from 4 megs to 15 megs (of space on the disk) with the change to SVG. It looks like there are just two images that account for nearly 10 megs, tho. So I could switch just those back to being pngs and that would make a big difference in the size. So maybe we also need finer-grained support to override the defaults in a few places?<div>
<br></div><div>Or is there support for zipping them somehow? That appears to get a 10x improvement for one of the big ones.</div><div><br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Oct 15, 2013 at 11:32 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Oh, right! Silly me. I've fixed 2htdp/image images so they can be converted to svgs.<div><br></div><div>I've also adjusted the scribble html renderer so that it treats the current-render-pict-as parameter as a suggestion on an ordering (png first or svg first) instead of insisting that all convertible things render as one or the other.</div>

<div><br></div><div>But now that I write this message, I'm thinking that it probably makes more sense to have a parameter whose value is a list of suggested conversions (the importance being the order) and that the parameters names should be based around the word 'convertible' instead of 'pict'.</div>

<div><br></div><div>Does that seem okay to you?</div><span class="HOEnZb"><font color="#888888">
<div><br></div><div>Robby</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 4:46 AM, Jens Axel Søgaard <span dir="ltr"><<a href="mailto:jensaxel@soegaard.net" target="_blank">jensaxel@soegaard.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013/10/15 Robby Findler <<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>>:<br>

<div>> I gave this a try and I'm just getting "???" in the image docs. Below is my<br>
> change to the image library. Does anyone know where the ???s come from?<br>
<br>
</div>I was puzzled at first, but if I understand correctly, the HtDP images<br>
aren't picts but image-snips.<br>
<br>
This implies that they don't get converted at line 585 in [1]<br>
pict-lib/texpict/private/mrpict-extra.rkt,<br>
but that the conversion called is the one in [2]<br>
gui-lib/mrlib/image-core.rkt at line 232.<br>
I only made changes in the first one, not the second one.<br>
<br>
I am unsure how to fix this - have the image snips still the pict, or<br>
have they become<br>
become bitmaps at this point?<br>
<br>
[1] <a href="https://github.com/plt/racket/blob/5ed686d9911b9f0d1cb1d5cb58d6950e33b9d17c/pkgs/pict-pkgs/pict-lib/texpict/private/mrpict-extra.rkt#L585" target="_blank">https://github.com/plt/racket/blob/5ed686d9911b9f0d1cb1d5cb58d6950e33b9d17c/pkgs/pict-pkgs/pict-lib/texpict/private/mrpict-extra.rkt#L585</a><br>


<br>
[2] <a href="https://github.com/plt/racket/blob/master/pkgs/gui-pkgs/gui-lib/mrlib/image-core.rkt#L232" target="_blank">https://github.com/plt/racket/blob/master/pkgs/gui-pkgs/gui-lib/mrlib/image-core.rkt#L232</a><br>
<span><font color="#888888"><br>
/Jens Axel<br>
</font></span><div><div><br>
<br>
> Robby<br>
><br>
> ☕  git diff | cat<br>
> diff --git<br>
> a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl<br>
> b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl<br>
> index 8a625611..d66c922 100644<br>
> --- a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl<br>
> +++ b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image-guide.scrbl<br>
> @@ -12,7 +12,9 @@<br>
>            "img-eval.rkt"<br>
>            scribble/decode<br>
>            scribble/manual<br>
> -          scribble/eval)<br>
> +          scribble/eval<br>
> +          scribble/core<br>
> +          scribble/html-properties)<br>
><br>
>  @(define guide-eval (make-img-eval))<br>
><br>
> @@ -35,8 +37,8 @@<br>
>  @(interaction-eval #:eval guide-eval<br>
>                     (require racket/list racket/local))<br>
><br>
> -<br>
> -@title[#:tag "image-guide"]{Image Guide}<br>
> +@title[#:style (style "svg" (list (render-pict-as 'svg-images)))<br>
> +               #:tag "image-guide"]{Image Guide}<br>
><br>
>  This section introduces the @racketmodname[2htdp/image] library<br>
>  through a series of increasingly complex image constructions<br>
> diff --git a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl<br>
> b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl<br>
> index 9c7d447..6f3cb39 100644<br>
> --- a/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl<br>
> +++ b/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings/image.scrbl<br>
> @@ -34,7 +34,7 @@<br>
>       (img-eval '(extra-margin 0))))<br>
><br>
><br>
> -@teachpack["image"]{Images}<br>
> +@teachpack[#:svg? #t "image"]{Images}<br>
><br>
>  @(define mode/color-and-nitty-text<br>
>     (make-splice<br>
> diff --git a/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt<br>
> b/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt<br>
> index 82ade26..b2c1b40 100644<br>
> --- a/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt<br>
> +++ b/pkgs/htdp-pkgs/htdp-doc/teachpack/htdp/scribblings/shared.rkt<br>
> @@ -1,12 +1,17 @@<br>
>  #lang racket/base<br>
><br>
> -(require scribble/manual)<br>
> +(require scribble/manual<br>
> +         scribble/core<br>
> +         scribble/html-properties)<br>
><br>
>  (provide teachpack<br>
>           beginner-require)<br>
><br>
> -(define (teachpack tp . name)<br>
> +(define (teachpack #:svg? [svg? #f] tp . name)<br>
>    (apply title #:tag tp<br>
> +         #:style (if svg?<br>
> +                     (style "svg" (list (render-pict-as 'svg-images)))<br>
> +                     #f)<br>
>           `(,@name ": " ,(filepath (format "~a.rkt" tp))<br>
>             ,(index (format "~a teachpack" tp)))))<br>
><br>
> ☕  [robby@yanpu]<br>
> ~/git/plt/pkgs/htdp-pkgs/htdp-doc/teachpack/2htdp/scribblings<br>
> ☕<br>
><br>
<br>
<br>
<br>
</div></div><div><div>--<br>
--<br>
Jens Axel Søgaard<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>