axiom-developer
[Top][All Lists]

## [Axiom-developer] Re: \begin{chunk}

 From: Ralf Hemmecke Subject: [Axiom-developer] Re: \begin{chunk} Date: Sun, 10 Sep 2006 20:28:56 +0200 User-agent: Thunderbird 1.5.0.5 (X11/20060719)

Maybe you have also realised that noweb offers a way to make
clickable code out of the code chunks. See the ALLPROSE
documentation. I am heavily using it. It seems that nobody has
considered that feature of noweb for use in Axiom pamphlets.


I took a stab at setting up allprose and didn't quite make it - I will

try again.

I was referring to the "documentation". That exists as html.


You should definitely read chapter 9 "How to setup all features of ALLPROSE". And if you run into trouble just drop me a mail. I don't claim that the setup is fool proof. I'd like to have autoconf for ALLPROSE, too, but I'll wait until Gaby has setup and documented the stuff for Axiom, maybe then it is easier for me to add the autoconf stuff.


So BEFORE you make the change to a new syntax, think twice about what
you will be missing afterwards. If it is then impossible to link
produce a link from one identifier in a code chunk to its definition,
then I am strongly AGAINST that change. And note you would have to
program all  that in LaTeX (or depend on the listings package or
something the like and add a few LaTeX lines). I don't think that
this can happen in just a few days if you want all the features that
noweb has NOW.


Correct me if I'm wrong, but I think the \begin{chunk}{chunkname}
syntax was intended to have the chunkname be mandatory.  Couldn't the
logic then remain the same and just go for {chunkname} as the target
instead of <<chunkname>>?  Perhaps even the chunk-within-chunk
insertion syntax of using the <<chunkname>> could be the same? e.g.

\begin{chunk}{Chunk1}
some code
\end{chunk}

\begin{chunk}{Chunk2}
some more code
\end{chunk}

\begin{chunk}{MasterChunk}
<<Chunk1>>
<<Chunk2>>
\end{chunk}


Oh, you should probably have written

\begin{chunk}{MasterChunk}
\use{Chunk1}
\use{Chunk2}
\end{chunk}

;-)

But you know that noweb can do stuff like

<<cat: CatA>>=
CatA: Category == ...
...
@ %def CatA

<<cat: DomainA>>=
DomainA: CatA == ...
...
@ %def DomainA


and noweave can make the CatA in the second chunk al link to the chunk that has the "%def CatA" attached. I think that the "listings" package can probably do similar things, but I am not sure whether it works over several chunks.


The other thing is that there seems to be too much manpower for
Axiom that people think about that syntax change. I guess writing in
noweb and having a little script later that translates the <<...>>
syntax into a LaTeX-like syntax automatically, is probably an easy
thing. But we should focus on more urgent matters. Noweb syntax
isn't too hard to learn.


No, it isn't.  But getting AucTeX to quit using $inside code chunks during it's fontification is not so easy, or maybe I'm just not doing it right. Does allprose fix this?    No, ALLPROSE does not add emacs support. That's something else. I also have this strange problem and add the moment for the places where the colours get wrong I add "%$" on a new line right after the closing @ of a chunk.

Ralf



reply via email to