axiom-developer
[Top][All Lists]
Advanced

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

RE: [Axiom-developer] Re: literate programming pamphlet files forMathAct


From: Bill Page
Subject: RE: [Axiom-developer] Re: literate programming pamphlet files forMathAction
Date: Fri, 1 Oct 2004 03:35:55 -0400

On Wednesday, September 29, 2004 3:10 PM Bob McElrath wrote:
> ...
> Bill Page wrote:
> > ... 
> > There are few more notes and some examples here:
> > 
> >   http://test.axiom-developer.org/wiki/ConversionToHTML
> > 
> > My approach is to use Norman Ramsey's Latex to HTML (l2h)
> > noweave filter. This filter together with noweave, is able
> > to produce HTML files directly from noweb (pamphlet) files.
> ...
> 
> Let me suggest that you do this as a ZWiki "pagetype". (see 
> pagetypes/ in the ZWiki source)  The relevant code for
> latexwiki is in the __init__.py file.

Yes, this is on my to-do-right list :)

> ... 
> Let me tell you what I have been doing, since it is very
> similar...
> 
> ... I have started [rewrite of ZWiki page-rendering code]
> this, and right now have a standalone code which does it
> "properly". This is a subclass of StructuredText and uses
> that machinery to render pages.
> 
> Why this is relevant to you:
> 
> When this is done I will start adding new page types.  For
> me the first will be "true" latex.

Wow, from what I have seen in Norman Ramsey's l2h code, that
sounds like a lot of work to do "from the ground-up", so as
to speak. BTW, if you read the l2h code, you will notice
that it does not use any regular expression pattern matching
stuff at all, but a rather different and seemingly robust,
mostly declarative parsing method that I hadn't seen before
called "continuations" - a little like co routines but different.
The syntax and semantics of Icon is very high level - not so
different from Python, so in principle a conversion of l2h
to Python might not be out of the question. In any case,
before embarking on "true" latex, I think it would be worth
looking at Ramsey's l2h documentation. See

  http://page.axiom-developer.org/zope/mathaction/l2h

> But since this is all done within the StructuredText system,
> new pagetypes (such as "spad") can *inherit* the needed
> latex functionality from latexwiki.  Thus we can combine
> our work into new page types in ways that cannot mangle the
> document.

I am not so sure how possible it might be to use Ramsey's
approach in the StructuredText framework - not such a good
match I think. One of my goals here is *code re-use* and
to avoid writing much new code except that needed as "glue".

> 
> The StructuredText classes are very simple.  Basically for
> each text "object" (like $math$) you have to write one
> function to recognize it and one function to render it. In
> addition there is a list of which "recognizers" have more
> importance than others, so you know what to do with things
> like [foo $bar$] vs. $foo [bar]$ or -- which takes precedence,
> the link [] or the latex?  This is very difficult to do
> properly with successive regexes that operate on the whole
> document. That it works at all right now is a rather large
> hack involving successive conversions to html, and ignoring
> html...

For me, such re-used has only really begun to seem possible
and practical in the new world of supercomputer desktops.
I used to think badly of, and label as a "hack", the sometimes
inefficient and often conceptually muddled software that
results from such "cross-breeding", but the technology has
definitely changed since the last time I did this kind of
work...
 
> 
> This is not as good as a formally defined document grammar,
> but is probably the best we can get with what we are doing.
> 
> Join me on #zwiki at irc.freenode.net if you'd like to
> discuss this further.  I think we should discuss the
> "big scheme" before we head in different directions and
> end up with a pile of incompatible software.

I would like to discuss this further, but I find synchronous
communication via irc etc. to awkward given my irregular
schedule. Let's continue here or via wiki somewhere (your
place or mine? :)

> 
> I have placed my preliminary StructuredText classes here::
> 
>    http://bob.mcelrath.org/WikiStructuredText
>
> along with a standalone example program showing how to use it.
> I hope this should make it obvious how to extend.
>
> This will result in a more extensible, understandable, and
> robust codebase.  Not to mention faster.

Thanks. I *will* look at this but I can not promise that it
will be soon.

> P.S. do I understand that MathAction is your website, and
> not a piece of software?

Yes. Specifically MathAction is what I call the stand-alone
LatexWiki-based website at

  http://page.axiom-developer.org/zope/mathaction

As you know, there is also the Axiom Portal web site that is
Plone-based and supports LatexWiki objects.

  http://page.axiom-developer.org/zope/plone

I really don't want to get into maintaining a piece of
software. I would much prefer to leave that to other people
(such as yourself). But as seems common among "open source
types", I am a bit of a maverick when it comes to using
(and re-using) software, so I can't guarantee that I will
always be working in a structured mode that will be easy
to merge. As usual, our ambitions still far out strip
our resources and time constraints...

Regards,
Bill Page.





reply via email to

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