axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-mail] Re: noweb


From: Ralf Hemmecke
Subject: Re: [Axiom-mail] Re: noweb
Date: Fri, 11 Aug 2006 11:20:29 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060719)

noweb is built so we can extract sources. we've had discussions about
changing the syntax so it is pure latex as in
  \begin{chunk}[chunkname]
  \end{chunk}

  {\use [chunkname]}
but i haven't spent any time hacking latex macros to do that yet.
if we take this step then there is no need for 'noweave' at all.

I am not sure whether I'd like the syntax change. And I quite doubt that in the near future someone is writing a LaTeX package that handles that stuff. For example:

\begin{chunk}{MyCode} % The chunkname should not be optional!!
false
\end{chunk}

\begin{chunk}{MyChunk} % The chunkname should not be optional!!
apply(x: Boolean, y: Boolean): Boolean == x and y;
(x: Boolean)/(y: Boolean): Boolean == x and y;
MyCode: Boolean == true;
use: Boolean := true;
b: Boolean := MyCode /\ use/\use {MyCode} % How should that be parsed???
\end{chunk}

Doing that kind of programming in TeX is extremely difficult, since in one place \ must be taken literally and in another it is considered as a character that starts commands. If you want the code also reasonably readable as a LaTeX source, I don't think that going the LaTeX way is the right choice.

Well, one option would be to redefine << and >> in LaTeX to deal with chunks. But then you could also take noweave. And second, noweave has some options that would be nice to have like '-index'.

we've also had discussions of doing the notangle in lisp which would eliminate the need for noweb at all.

I've already written a *restricted* version of notangle in Perl.
http://lists.nongnu.org/archive/html/axiom-developer/2006-08/msg00153.html
Surely, we probably also want the notangle option

-L'#line %L "$<"%N'

which relates the line numbers of an extracted .as file to the original line numbers in the .as.pamphlet source.

Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]