[plt-scheme] changing code font size in slideshow
More idiomatic would be to reverse the arguments, allow multiple
"code" expressions, and call it with-font-size:
(define-syntax with-font-size
(syntax-rules ()
[(with-font-size size expr ...)
(parameterize
([current-font-size size])
expr ...)]))
[Untested]
HTH,
N.
On Sat, Nov 14, 2009 at 11:05 AM, Aleix Conchillo Flaqué
<aleix at member.fsf.org> wrote:
> 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)
>