axiom-developer
[Top][All Lists]

## Re: [Axiom-developer] build-improvements and latex

 From: Ralf Hemmecke Subject: Re: [Axiom-developer] build-improvements and latex Date: Sun, 22 Oct 2006 23:46:30 +0200 User-agent: Thunderbird 1.5.0.7 (X11/20060909)

On 10/22/2006 07:31 PM, root wrote:

Although noweb implements three of four features I don't see it as a
requirement. Indeed there has been discussion of other formats such as

...

* latex macro forms which replace the <<>> syntax with
\begin{chunk}{chunkname}, not yet public.

Can one infer that there is (the beginnings of) one which is private?


yes. i'm learning a lot about the tex language so it's taking time.
latex does similiar processing to handle bibligraphic and index files.

if latex can do code chunks directly, format them properly in
a latex document and dump the code to a file there is no need
for any other tool.



I am not sure whether I should support that, but surely formatting of code chunks is not a problem. Already the verbatim or fancyvrb packages can do that. Maybe the listings package is well suited for this task.


When it comes to code generation, that is probably getting a bit tricky. Suppose you want to have

\begin{chunk}{chunkname}
b: Boolean := true;
for i in mylist repeat {
\usechunk{anotherchunk}
b := b/\odd? i;
}
\end{chunk}


If you produce TeX code that can master that correctly, I'll call you a TeX-guru. (Note that I mean /\ and not \odd.) That the braces after \usechunk are treated differently than the braces of 'repeat'. But that is probably an easier exercise.


TeX can write files, but note that before it has to bring the code chunks into the right order. That basically means that TeX must keep the whole file in memory if the <<*>> definition comes at the end. One problem here is that not every TeX-installation has set the pool sizes high enough. So I expect that the TeX approach very much depends on the TeX installation and cannot "just work".

And last, I don't think that the TeX approach will be faster than noweb.

Just my two cents on that approach.

Ralf



reply via email to