[plt-scheme] schemeblock w/ pretty printing in scribble

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon May 31 12:09:05 EDT 2010

schemeblock (racketblock) is sensitive to the source location
information in the syntax object. If you synthesize that, or use
port-count-lines! on the port that you read-syntax from, then you can
control how it renders.

Jay

On Mon, May 31, 2010 at 10:06 AM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:
> The schemeblock form preserves the layout of its argument, but I have a case
> where I am programmatically generating the argument and its layout (as a
> string), but I can't get schemeblock to render it properly.
>
> Here is my best guess:
>
> #lang scribble/doc
> @(require scribble/manual)
>
> @(schemeblock
>  (0
>   1 2 3))
>
> @(schemeblock
>  #,(read-syntax #f (open-input-string "(0\n 1 2 3)")))
>
> The first schemeblock preserves the layout of the list.  The second renders
> it as (0123).  How can I change the second example to produce the first
> result?
>
> David
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.