[plt-scheme] scribble/latex

From: Jakub Piotr Cłapa (jpc-ml at zenburn.net)
Date: Tue Feb 12 16:44:31 EST 2008

Eli Barzilay wrote:
> On Feb 12, Jakub Piotr C?apa wrote:
>> It seams that one could make a LaTeX preprocessor out of it (the
>> @-reader could be made into an \-reader).
> It can easily do that, for example (which requires the recent svn
> snapshot since I fixed a bug in the use-at-readtable function today):
>   > (require scribble/reader)
>   > (use-at-readtable #:command-char #\\)
>   > '\itemize{\item blah blah \item foo bar}
>   (itemize item " blah blah " item " foo bar")

Thanks for free snippet. :) It is good to know it works seamlessly in 
the repl.

>> This could greatly simplify writing TeX macros in the short term
>> (you could do the API part in Scheme and the implementation part in
>> TeX) and lead to a new TeX implementation in the long term.
> I'm not following that, but if you're talking about throwing raw tex
> code into mzscheme then it requires much more.  The thing about tex is
> that you can change how it parses source, and even do that
> dynamically.

I find that you can get away with rewriting the macro packages you need 
(and there are less than 20 in use in my documents) and the whole LaTeX 
thing is about standarizing the parsing (OTOH you can get much prettier 
macros using \def than \newcommand).
AMS journals seems to work like this for a long time now --- they limit 
the avaliable packages because they pass your submissions through their 
HTML generator which doesn't handle all of TeX (TeX2ht also works this 
way doesn't it?).

The bigger problem IMHO is that you can't really do typesetting in such 
a frontend because you have no access to box widths and such (this 
situation seems similar to that of AJAX and what Google Web Toolkit 
want's to handle).

Jakub Piotr Cłapa

Posted on the users mailing list.