[racket] using scribble/eval in conjunction with scribble/lp

From: Joel McCracken (mccracken.joel at gmail.com)
Date: Sun Dec 14 02:24:01 EST 2014

I'm trying to create a document that includes code, describes that
code, includes example usage, and exports some of the bindings so that
it may be included later.

I've been looking at the scribble documentation, and it seems like all
this should be possible. I can't seem to figure out how to actually
run examples. Here's what I have:

#lang scribble/lp

@(require scribble/eval)

This would be a wonderful way to accomplish things!

@chunk[*
        (define (f x)
          <f-body>)]

@chunk[<f-body>
        (* x x)]


And then, I could show an example:

@examples[
        (f 10)
]


Any advice would be really appreciated.

Posted on the users mailing list.