I'm still curious to get scribble/lp working, but I've figured out an immediate solution to my question. I was able to get the behavior I want with just a simple macro:<br>@(define-syntax-rule (code l)<br> (begin<br>
@schemeblock[l]<br> l))<br><br>Below is a sample of its use to get the behavior I want where you can hit run and have your code execute, or hit the scribble-html button to have it scribbled. If others like this idea as much as I, maybe this macro would be something worth including in scribble/manual? <br>
<br>One thing I still haven't figured out is how to get a comment (introduced with a semicolon) that is in the code block to show up in the scribbled output. (In the example below, the comment ";; the zero test" doesn't show up in the scribble output).<br>
<br>------- Example -----<br><br><br>#lang scribble/manual<br>@(define-syntax-rule (code l)<br> (begin<br> @schemeblock[l]<br> l))<br><br>@title{This is the title of my document}<br><br>Welcome to my test of the scribble system. Above, I gave the document a title. Here is some introductory text.<br>
<br>@section{Factorial}<br><br>I'm going to define the factorial function. <br><br>@code[<br>(define (factorial n)<br> (cond<br> [(zero? n) 1] ;; The zero test<br> [else (* n (factorial (sub1 n)))]))<br>
]<br><br>@section{Conclusion}<br><br>To turn this file into pretty HTML, just push the Scribble HTML button in the upper-right corner.<br>