[racket] typesetting a macro in slideshow

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Sep 5 15:20:12 EDT 2011

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:

  #:title "Title"
   (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'.]

Posted on the users mailing list.