Moving the contracts to the original exports ensures that the bindings
from both modules are the same. In particular, making the bindings
different caused the documentation to have missing links.
For something like
#lang scribble/manual
@(require scribble/eval)
@interaction[(define x 2)
x]
the `interaction` form generated an empty nested table for the zero
results from `define`. When rendering via Latex, that empty table
could create vertical whitespace. Produce zero lines in the enclosing
table, instead.
The error-logging change in 81aeab1687 didn't work well for me
in further experiments. Change `interactions`, etc., to have a
`#:no-errors?` argument, instead. Also, add `eval:no-prompt`,
which provides an alternative to `def+int`.
Improve the documentaiton by correcting mistakes and filling
in some missing exports.
Instead of creating a table to combine "Examples:" with the exmaple
content, use a compound paragraph (which didn't exist when `examples`
was first implemented). A compound paragraph provides better and more
consistent typesetting; for example, it doesn't make the word
"Examples:" use a fixed-width font in HTML output.
When an expression in `examples` or `interactions` raises an
exception, the error message is rendered as part of the documentation.
Now, however, unless the expression is wrapped with `eval:error`, an
error is also logged.
Logging an error is a compromise between backward compatibility (for
documents that rely on undeclared but expected errors) and making a
document fail completely (which would be nicer when an error is not
expected).