axiom-developer
[Top][All Lists]
Advanced

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

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


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

On 09/10/2006 03:32 PM, root wrote:
There are axiom-specific latex tags. This is likely to increase rather than decrease. This should be expected as we depend more on latex as our tool. For instance, I have an as-yet-unpublished
 tag set that removes the use of

<<randomchunck>>=

and replaces it with latex syntax

\begin{chunk}{randomchunk}

Before you don't show a .sty file, I hope that syntax change will not
happen. ;-)

Tim, when do you plan to make this change? I realize it can be (almost) automated but it would be nice to have that style going forward, if that's our final target. I've been working with auctex
and mmm-mode trying to convince auctex to quit using code chunks
when it does its fontifying of the latex part of the document.
Also, if we use \begin{chunk} mmm-mode (which handles the dual-mode
part of things) will need to be taught how to recognize the new
environment.

Exactly. If Tim changes the syntax without giving us the nice tools we
have NOW, that would be a step back.

The change will probably come about once I figure out all the details
of 'environments', which is fairly hairy. TeX is not the easiest
language to learn. I wouldn't worry about the change.

Well, if you considered LaTeX that is probably totally easy. Build on
the fancyvrb package and you have what you want in a couple of minutes.
There is also the "listings" LaTeX package which should be considered.

Also, one idea I want to mention now while there is still time to consider it - would it be difficult to have an optional tag for a
chunk name identifying what language the code chunk is written in?
I ask because for a number of applications (emacs mode mapping,
syntax highlighting in LaTeX using a package whose name escapes me
at the moment) it would be nice to know what language the chunk is.

Well, if Cliff wants several languages in one file, then an optional
argument is a good idea. Again, an optional argument to an environment
is easy in LaTeX. However, I am not so sure why I would want several
languages in one file. Cliff, do you intend to mix your Aldor files with
LISP code? Brrrrhhh.

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.

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.

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.

Do whatever you like. It is open source after all. But I am really not convinced that a syntax change should happen now.

Ralf




reply via email to

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