I'm experimenting with Scribble and wanted to see about including function plots.
Something like this:
#lang scribble/base
@(require scribble/manual)
@(require plot/pict)
@title{Plots in Scribble}
The sine function:
@(plot (function sin (- pi) pi #:label "y = sin(x)"))
gives me:
scribble-plot-test.scrbl:9:24: pi: unbound identifier
in: pi
location...:
scribble-plot-test.scrbl:9:24
context...:
/usr/share/racket/pkgs/scribble-lib/scribble/run.rkt:175:26: go
.../private/map.rkt:40:19: loop
.../racket/cmdline.rkt:191:51
body of "/usr/share/racket/pkgs/scribble-lib/scribble/run.rkt"
In DrRacket, that works fine. It seems like the pi
constant is defined in base Racket. I know I'm not using #lang racket
, but I was expecting that to work.
I can of course define it, but it seems like I should be able to do import/require.
If I try to (require math)
, I get:
scribble-plot-test.scrbl:3:10: module: identifier already required
at: ::
in: math
also provided by: scribble/manual
What should I do here?