[racket] scribble: @verbatim inside macro

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Wed Nov 23 14:26:50 EST 2011

I want to write a macro in scribble that will output a `verbatim' but I keep getting an error about 'expected pre-content? got #<table>'. What should I do in the macro so that I can output verbatim? I tried various things other than `para' but none seem to work.

@(define-syntax-rule (my-example stuff)
   @para{An example: @(verbatim stuff)})

@my-example{some stuff}

$ scribble --pdf main.scrbl
para: contract violation, expected: pre-content?, given: #<table>
   contract from: <collects>/scribble/base.rkt, blaming:
      (#:style (or/c style? string? symbol? #f))
      (listof pre-content?)
   at: <collects>/scribble/base.rkt:387.2

Posted on the users mailing list.