[racket] Literate Programming and Scribble

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Sep 9 22:21:06 EDT 2010

On Sep  9, Patrick King wrote:
> 
> I have been using OpenOffice Math module, and pasting screen
> scrapings into PNG files.  Definitely, something more elegant and
> less labor intensive is needed.  Even easier access to fonts on the
> fly would help.

Using images sound like the usual fragile solution, so ideally there
will be some better solution for both latex/pdf and html in the
future.  (But it's been more than a decade that math-in-a-browser is
"just around the corner".)

If you do want to use images, you can probably write some simple
function that:

  * Accepts a string (actually a variable number of string arguments,
    to make it scribble-friendly),

  * Compute some "unique" checksum of this content (eg, its sha1) to
    be used as the file name,

  * If the file name derived from this checksum doesn't exist, invoke
    whatever external tool you have to create the image,

  * Return the scribble value that refers to that image.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.