[racket] Literate Programming and Scribble

From: Patrick King (slowthought at gmail.com)
Date: Thu Sep 9 19:23:58 EDT 2010

On Thu, Sep 9, 2010 at 4:23 PM,Deren Dohoda <deren.dohoda at gmail.com> wrote:

> I am sorry to ask such introductory questions, but it's killing me to
> see "literate programming" in Racket while finding myself unable to
> use it. I love noweb and all, but I am writing a literate Racket
> program and, well, I'd like to use Racket.
>

Racket was my first literate programming tool, and also my first Scribble
project.  If you've already been using Scribble, it should be an easy
transition.

>
> 1) Is this intended correct flow: literate program included in
> scribble document exported to pdf/html?


This is the only way I've gotten it to work.  I agree that it seems
strange.  It would be nice to have the "scribble HTML" button that appears
in my source editor (because of #lang scribble/lp?) actually work!

>
> 2) Is there any way to use arbitrary latex markup in Scribble? I could
> attempt to roll my own reader to simulate something like noweb but I
> thought there may be something available and it is hard to justify
> working in a new reader only to simulate a tool I already have
> available. (I find modifying the reader to be an arcane process,
> personally, even with the copious documentation.) The documentation
> didn't seem to suggest it: I could find no way to include mathematical
> formula in scribble. It is rare to have a program that doesn't include
> *some* math formula or other, so I figured it must be available, but
> again, I couldn't find it.
>

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.

>
> Thank you for any help. Ideally I'd find a way to make working with
> the Racket documentation format literate so if the project I'm working
> on could find use in PLaneT I wouldn't have to write everything twice.
>

Personally, I use LP to write comments to myself, more than anything else.
Possibly, my audience could include engineers or scientists (program as
research paper), as I suspect yours might.  Users, however, are users.  They
don't care how it works, just that you did the work for them.  User
documentation will always be separate, and properly so (I have no interest
in an LP describing the implementation of the numeric tower, for example).

Pat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100909/2ace1b70/attachment.html>

Posted on the users mailing list.