[racket] [scribble] rendering of fractions

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Nov 20 17:41:52 EST 2011

I've pushed an update to number-snip% so that it subscribes to the
'png-bytes and 'text parts of the file/convertible protocol.

I think that all you'd need to do now is to use pretty-print to print
and set some hooks so that when you see a rational number, you create
a number-snip% instead. That is, you should not need to deal with
simple-settings and all that nonsense.

Robby

On Sat, Nov 19, 2011 at 5:52 PM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
> Thanks, this seemed to work (after adding a (begin ...) around), but then it turned out to be a nightmare of dependencies (snips, simple-settings, ...).
>
> So I'm giving up--it was not crucial anyway.
>
> I'll patiently wait for a cute update ;-)
>
> -- Éric
>
>
> On Nov 19, 2011, at 3:42 PM, Matthew Flatt wrote:
>
>> At Sat, 19 Nov 2011 13:41:33 -0300, Eric Tanter wrote:
>>> More precisely here, how can I specify that I want a specific
>>> pretty-print-print-hook for the whole evaluator?
>>
>> You'll need to set `current-print' to use `pretty-print'. Also set
>> `pretty-print-size-hook' and `pretty-print-print-hook' imperatively:
>>
>> @interaction-eval[
>> #:eval my-eval
>> (require racket/pretty)
>> (current-print pretty-print-handler)
>> (pretty-print-size-hook ....)
>> (pretty-print-print-hook ....)
>> ]
>>
>>
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



Posted on the users mailing list.