[plt-scheme] including a text file inline in slideshow

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Jun 19 17:16:41 EDT 2005

At Sun, 19 Jun 2005 17:08:31 -0400, Doug Orleans wrote:
> Now, though, I'd also like the same thing for Scheme code in an
> external file.  I can't just replace "tt" with "code", since the
> latter is a macro.  I tried the following but it puts everything on
> one line:
>   (define (scheme-file->pict file)
>    (call-with-input-file file
>      (lambda (port)
>        (typeset-code (read-syntax file port)))))
> Any hints?

Add `(port-count-lines! port)' before the call to `typeset-code'.


Posted on the users mailing list.