[racket] typesetting a macro in slideshow

From: Ismael Figueroa Palet (ifigueroap at gmail.com)
Date: Mon Sep 5 15:25:51 EDT 2011

It works now, thanks!

2011/9/5 Matthew Flatt <mflatt at cs.utah.edu>

> At Mon, 5 Sep 2011 14:56:11 -0400, Ismael Figueroa Palet wrote:
> > I want to typeset a macro in slideshow, and I did something like this:
> >
> > (slide
> >  #:title "Title"
> >  (typeset-code
> >   #'(define-syntax A
> >       (syntax-rules ()
> >         ((A s ...) s)))))
> >
> > but I get the error: "syntax: no pattern variables before ellipses in
> > template in: ..."
> >
> > is it possible to typeset? how should it be done?
>
> You can use `quote-syntax' instead of #' or `syntax', but I would use
> the `code' form:
>
>  (slide
>  #:title "Title"
>   (code
>   (define-syntax A
>     (syntax-rules ()
>        [(A s ...) s]))))
>
>
> [I'll try to change the `slideshow/code' docs to reverse the order of
> `code' and `typeset-code'.]
>
>


-- 
Ismael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110905/52febfd8/attachment.html>

Posted on the users mailing list.