[racket] scribbling newbie questions
> Q2
> I use verbatim to escape interpretation, but this function always produces a
> separate line. Is there something like verbatim that I can use within a
> paragraph? For example to include character @ and unbalanced parentheses and
> brackets in plain text.
Here's an example of how to escape interpretation, as well as the
implicit decoding that happens on strings:
---
#lang scribble/base
@(require scribble/core)
@(define (verb . elts)
(element 'tt elts))
You can look at this: @verb|{hello world--- at verb[]}|.
In contrast, @tt{hello---again I am in a @verb[]}.
---
The idea is that Scribble provides a high-level and low-level
interface. In the low-level interface, we're responsible for calling
decode-content, the function that (among other things) interpolates
"---" with em-dashes. Also, note the use of the "|{" "|}", which is a
way to keep the inner "@" from triggering Racket evaluation. See:
http://docs.racket-lang.org/scribble/reader.html#(part._alt-body-syntax)
for more details.