[racket-dev] conditional scribble documents

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Apr 25 19:26:40 EDT 2012

20 minutes ago, Danny Yoo wrote:
> I know I can always hack around Scribble limitations.

(How is this different from running any other program that needs to
work in several differen ways? ...)

> Conditional generation is a common use case.  In particular, the use
> case I'm considering directly affects the Bootstrap curriculum work
> I'm doing in the summer: we need to generate documentation for both
> students and teachers, and we'd really like to use the same source
> file.

... for example, why not set up files that set some parameter and then
run the program.  You said that you want a `++load my-module.rkt' --
why not change "my-module.rkt" -> "my-module.scrbl", and just render

> As such, I'd really like a good way to set up parameterizations in a
> way that's directly supported by the Scribble command line tool.
> The scribble tool is hardcoded to set up certain parameterizations,
> such as current-render-mixin, through its command line arguments.
> I'd like that facility to be open to extension.

Alternatively, propagating some user-defined command line flag to the
scribble code is the same solution as using an environment variable.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.