[plt-scheme] changing code font size in slideshow

From: Aleix Conchillo Flaqué (aleix at member.fsf.org)
Date: Sat Nov 14 06:05:02 EST 2009

I have defined this to help changing code size and avoid writing
parameterize each time. I'm very newbie, so probably there's a much
better way to do it. I used (plai-code) because I'm doing a slides for
some PLAI chapters.

(define-syntax plai-code
  (syntax-rules ()
    [(plai-code code) code]
    [(plai-code code font-size) (parameterize
                                   ([current-font-size font-size]) code)]))

(plai-code (code ...))
(plai-code (code ...) 26)


On Fri, Nov 13, 2009 at 14:40, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> Just a little more detail. Here's how you can set it locally to a use
> of 'code'. (You'd have to use a macro to abstract over this.)
>
> Robby
>
> #lang scheme
> (require slideshow slideshow/code)
>
> (slide (parameterize ([current-font-size 32])
>         (code (f x)))
>       (parameterize ([current-font-size 18])
>         (code (f x))))
>
>
>
> On Fri, Nov 13, 2009 at 7:37 AM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> current-font-size.
>>
>> Robby
>>
>> On Fri, Nov 13, 2009 at 2:08 AM, Aleix Conchillo Flaqué
>> <aleix at member.fsf.org> wrote:
>>> Hi,
>>>
>>> I'm trying to find how to change the font size for the slideshow code
>>> macro. I have successfully changed the font style by using
>>> (current-code-font) but I'm still not able to change the size.
>>>
>>> Is this possible?
>>>
>>> Thanks in advance,
>>>
>>> Aleix
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>
>>
>


Posted on the users mailing list.