login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #229 Axiom Output in Documentation revision 1 of 1

1
Editor:
Time: 2007/11/17 22:12:20 GMT-8
Note:

changed:
-
One of the purposes of MathAction is to allow Axiom commands
to be including in web pages and have the Axiom output
automatically generated and displayed on the page. The Axiom
commands are wrapped with syntax that looks like a LaTeX
environment::

  !\begin{axiom}
  integrate(sin x, x)
  \end{axiom}

but although MathAction uses LaTeX for formatting, the Axiom
commands are not actually processed by LaTeX. Instead they
are processed by the pre-processor of the page source that is
part of the LatexWiki package (written in Python).

Preprocessing During Weave

  The ability to automatically include the output of Axiom
commands should be available not only in MathAction web
pages but in all Axiom documentation. Since Axiom uses
[Pamphlet Files] (noweb [Literate Programming]) for everything,
this means that the pre-processing of Axiom pseudo-environments
could be done during the 'weave' operation pre-processing that
generates LaTeX source from pamphlet file source.

Preprocessing in LaTeX

  Alternatively, LaTeX itself could be extended to process
these special environment commands in a manner similar to
the way GraphViz commands are currently handled. In this
case the LaTeX coding for the !\begin{axiom} environment
would first look for a corresponding Axiom output file. If
it exists, then the contents of that file would be simply
included at that point in the LaTeX document. If it does not
exist, then the text content of the environment, i.e. the
Axiom commands, would be written to an Axiom input file.
At the end of the LaTeX pass, if any Axiom input files have
been generated, then Axiom would be run (probably with the
help of an appropriate shell script) to process these input
files and generate corresponding output files. Finally,
LaTeX is run again to generate the complete dvi file in the
usual manner.

Axiom Output in Pamphlet Files on MathAction

  Adding Axiom output to pamphlet files on MathAction will be
quite easy because the program logic to do this already exists
at part of the Pamphlet page type. However at this time this
logic is not applied to the pamphlet part of the page itself
but only to the StructuredText part of the page which follows
the \\end{document} command and usually consists mostly of
comments.

The difference is that the StructuredText part is rendered
as HTML with embedded images, while the pamphlet part is
rendered directly as 'dvi' and 'pdf' files linked from the
pamphlet first page thumbnail image. This extension is straight
forward but should only be done when support of included Axiom
commands is also available outside the MathAction environment.


Submitted by : (unknown) at: 2007-11-17T22:12:20-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

One of the purposes of MathAction is to allow Axiom commands to be including in web pages and have the Axiom output automatically generated and displayed on the page. The Axiom commands are wrapped with syntax that looks like a LaTeX environment:

  \begin{axiom}
  integrate(sin x, x)
  \end{axiom}

but although MathAction uses LaTeX for formatting, the Axiom commands are not actually processed by LaTeX. Instead they are processed by the pre-processor of the page source that is part of the LatexWiki package (written in Python).

Preprocessing During Weave

The ability to automatically include the output of Axiom commands should be available not only in MathAction web pages but in all Axiom documentation. Since Axiom uses [Pamphlet Files]? (noweb Literate Programming) for everything, this means that the pre-processing of Axiom pseudo-environments could be done during the weave operation pre-processing that generates LaTeX source from pamphlet file source.

Preprocessing in LaTeX

Alternatively, LaTeX itself could be extended to process these special environment commands in a manner similar to the way GraphViz commands are currently handled. In this case the LaTeX coding for the !\begin{axiom} environment would first look for a corresponding Axiom output file. If it exists, then the contents of that file would be simply included at that point in the LaTeX document. If it does not exist, then the text content of the environment, i.e. the Axiom commands, would be written to an Axiom input file. At the end of the LaTeX pass, if any Axiom input files have been generated, then Axiom would be run (probably with the help of an appropriate shell script) to process these input files and generate corresponding output files. Finally, LaTeX is run again to generate the complete dvi file in the usual manner.

Axiom Output in Pamphlet Files on MathAction

Adding Axiom output to pamphlet files on MathAction will be quite easy because the program logic to do this already exists at part of the Pamphlet page type. However at this time this logic is not applied to the pamphlet part of the page itself but only to the StructuredText part of the page which follows the \end{document} command and usually consists mostly of comments.

The difference is that the StructuredText part is rendered as HTML with embedded images, while the pamphlet part is rendered directly as dvi and pdf files linked from the pamphlet first page thumbnail image. This extension is straight forward but should only be done when support of included Axiom commands is also available outside the MathAction environment.