axiom-developer
[Top][All Lists]
Advanced

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

RE: [Axiom-developer] RE: Another question


From: Page, Bill
Subject: RE: [Axiom-developer] RE: Another question
Date: Tue, 22 Aug 2006 13:31:09 -0400

On Tuesday, August 22, 2006 9:05 AM Ralf Hemmecke wrote:
> .. 
> I remember I have seen that thing in graphviz.sty. 
> Nevertheless, could you send over this SAGE file. I don't
> have SAGE running here.
>

See attachment below.
 
> >> The \begin{axiomoutput}{somenumber} ... \end{axiomoutput}
> >> environments should simply ignore there content and set
> >> the content of the file axiom.somenumber.tex.
> >>
> >> Doesn't sound un-doable to me.
> >>
> > Bill Page wrote: 
> > Quite doable. Now, the question is: Are Axiom developers
> > and users really motivated to use this sort of thing??
> 
> Ooops. What sort of thing?
> 

<sigh> I guess I had better try to answer this since on
Tuesday, August 22, 2006 11:42 AM Tim Daly asked:
> 
> > Quite doable. Now, the question is: Are Axiom developers
> > and users really motivated to use this sort of thing??
> 
> probably i am; but i can't figure out what 'this sort of thing'
> is.
> 
> *) what are you trying to achieve?

1) Write pamphlet files containing embedded Axiom commands that
   generate output that becomes part of the literate programming/
   mathematics document in a collaborative wiki-based environment.

2) Search and display these document online in a web browser as
   efficient HTML/MathML/jsMath etc. PDF and DVI still seem very
   awkward in comparison to web pages although they have a more
   reliable presentation.

3) Generate hyperlinks related to program call and inheritance
   structures like ALLPROSE and hyperdoc. Browser through the
   Axiom library online.

4) Other aspects as discussed in this thread.

> *) where can i see examples

We do have some related examples:

http://wiki.axiom-developer.org/SandBoxSagePamphlet

http://wiki.axiom-developer.org/book--main--1/Endpaper3

See also the Up/Down navigation left sidebar on each Axiom
Wiki page (except FrontPage). In some case the Topic/subtopic
links reflect the structure of the Axiom library - this could
be made more so.

> *) what are the benefits/cost?

Probably 0/0. This is open source, remember?

> *) what tools do i need, 
> *) where do i get them, 
> *) how do i set them up?

This is open source, remember? ;) Consult the axiom-developer
email list archive. See also

http://wiki.axiom-developer.org/MathAction

(but you knew that :)

The reason why I asked: "Are Axiom developers and users really
motivated to use this sort of thing?" is because no one has
shown very much motivation so far. :( I am beginning to
seriously wonder if investing more time in better tools is
really worth the effort. It seems that we are still as stuck
in the old situation where (almost) the only people who use
the tools are the people who built them, e.g. MathAction and
ALLPROSE. And I guess what I really want to do is just that...
which is probably the reason I have been feeling so conflicted
lately.

I am amazed (and pleased) to see the amount of effort going
into the development of Sage. I am disappointed at the rate
of progress in Axiom. I worry about the delay in the open
source status of Aldor. I am disappointed that in the Sage
project I see some things that Axiom does very well being
re-invented badly. I am thinking about the best strategy for
the survival of a legacy project like Axiom when something
old made new (Sage) can attract so much interest. I am
tempted to suggest that hooking Axiom to the Sage bandwagon
as soon as possible might be the best idea. But that makes
Axiom seem subordinate when I really believe that it does
many things better even though it was designed nearly 30 years
earlier. Which rather leads off-topic, I have to admit...

Regards,
Bill Page.

--------

For an example pamphlet file on the Axiom Wiki that uses the
sagetex.sty file, see:

http://wiki.axiom-developer.org/SandBoxSagePamphlet

For stand alone use one does

  $ latex example.tex
  $ sage example.sage      <--- created by first pass
  $ latex example.tex      <--- reads output from sage

to generate the dvi file containing embedded Sage output.

Something similar is done by the graphviz.sty package but
in that case is used \write18 in order to directly issue
shell commands so the intermediate step is hidden.

-------

$cat sage-1.3.6.2/examples/latex_embed/sagetex.sty:

\RequirePackage{verbatim}

address@hidden
address@hidden

address@hidden
\typeout{Writing sage input file \jobname.sage}
address@hidden sagetex}
address@hidden('\jobname.sout')}

address@hidden
  address@hidden@address@hidden@sage}{#1}
  address@hidden
}

\InputIfFileExists{\jobname.sout}{}

address@hidden

% this macro typesets the corresponding output (read from the *.sout
auxiliary file)
address@hidden@bsphack%
 
address@hidden@address@hidden@address@hidden@address@hidden@address@hidden
  address@hidden
}

address@hidden@bsphack\begingroup\obeyspaces\obeylines\@@@sage}

\def\@@@sage#1{%
 address@hidden
 address@hidden(\the\toks@)}%
 address@hidden
}

address@hidden@vobeyspaces
 address@hidden
 address@hidden()}%
 address@hidden _ in [1]:}%
 address@hidden
   address@hidden address@hidden
   address@hidden
 }%
 address@hidden
}
\def\endsageverb{%
  address@hidden()}%
  address@hidden
}

\def\sageblock{%
 address@hidden@sage
 \par\tt\vspace{3ex}\parindent 6em
 address@hidden()}%
 address@hidden True:}%    % hack to allow indentation
  address@hidden
  \catcode`\^^M\active
  address@hidden  % to get actual spaces
  address@hidden
    address@hidden address@hidden
    address@hidden
  }%
  address@hidden
}
\def\endsageblock{%
  address@hidden()}%
  \vspace{3ex}
  address@hidden
}

\def\sagesilent{%
 address@hidden@sage
 address@hidden()}%
 address@hidden True:}%   % hack to allow indentation
  address@hidden
  \catcode`\^^M\active
  address@hidden  % to get actual spaces
  address@hidden
    address@hidden address@hidden
  }%
  address@hidden
}
\def\endsagesilent{%
  address@hidden()}%
  address@hidden
}

-------------

$cat sage-1.3.6.2/examples/latex_embed/sagetex.py:

from sage.misc.latex import latex

def openout(f):
  global _file_
  _file_=open(f,'w')

def inline(s):
  _file_.write('address@hidden' + latex(s) + '}\n')

def block_begin():
  _file_.write('address@hidden')

def block_end():
  _file_.write('}\n')

------------




reply via email to

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