[racket] Integrating scribble and LaTeX

From: Ohad Kammar (ohad.kammar at ed.ac.uk)
Date: Wed Jun 22 07:16:36 EDT 2011

> So I'd like to second the request that there be an easy way to include Scribble code in a LaTeX document.

I conclude differently, especially as LaTeX is a fairly horrible place
to be as a programming language. A perfectly reasonable solution is to
include LaTeX code in a Scribble-like language.

The requirements I would ask of a Scribble-like DSL with a LaTeX
back-end would be something like:

1. The end result is a portable LaTeX program.
2. The programmer has full control over the LaTeX formatting, which
isn't more difficult than formatting in raw LaTeX.
3. The effort required to interface to existing LaTeX code, including
packages and existing document parts, is constant, independent of the
program size.
4. There is a clean execution model. I.e., one doesn't have to think
too hard about rerunning latex in the background to get
cross-references right.

Points 1-3 are straightforward if you know the innards of Scribble
(which sadly I don't). Requirement 4 could be a bit more tricky, but I
think that there are nice ways to get around it.


On Wed, Jun 22, 2011 at 11:33 AM, Stephen Bloch <sbloch at adelphi.edu> wrote:
> On Jun 22, 2011, at 1:43 AM, Don Blaheta wrote:
>> The reasons I want to use Scribble snippets inside a broader LaTeX
>> context is that I have a substantial part of this document already
>> written, and a huge installed base of LaTeX documents that include a
>> large amount of custom definitions.  I do have time during this project
>> to learn a bit of Scribble; I do not have time during this project to
>> learn all of Scribble and convert all my .cls files into their nearest
>> Scribble equivalents.... it's going to be
>> a lot harder to make that decision if I can't first dip in my toe and
>> make it work with my existing installed base.  It's especially hard if
>> I'm not yet sure Scribble can do everything I want it to and thus might
>> be required to abandon the effort half-done.
> Early in the development of _Picturing Programs_, I switched from LaTeX to MS Word, on grounds that I was going to need a lot of graphics in this book so a WYSIWYG editor would be helpful.  After a few months, I concluded that many things I wanted to do were much more difficult in Word, and some were completely impossible, so I converted the whole book back to LaTeX.  I don't want to go through that again with a 400-page book.  I could see substantial benefit in rewriting some parts (e.g. certain code samples) in Scribble, but rewriting the whole book in Scribble sounds like a lot of work.  So I'd like to second the request that there be an easy way to include Scribble code in a LaTeX document.
> Stephen Bloch
> sbloch at adelphi.edu
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Posted on the users mailing list.