[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] trying to add a new output format
From: |
Andrey G. Grozin |
Subject: |
[Axiom-developer] trying to add a new output format |
Date: |
Wed, 7 Sep 2005 01:06:02 +0700 (NOVST) |
Hello *,
I am trying to add various things to axiom which are useful for
the TeXmacs interface, but can be also useful for other purposes
(interfaces with other external programs, for example).
But I have a lot of questions (naturally). First, when I edit some
.boot.pamphlet file(s) in src/interp and say
make
this file is compiled, but AXIOMsys is not re-generated. Is this
due to the .PRECIOUS line in the Makefile? How do I re-generate
AXIOMsys after editing a file in src/interp? Simply deleting
AXIOMsys does not help.
Second, I tried to introduce a new output format today. To make
things simpler, I started from introducing LatexFormat, which is
nearly identical to the TexFormat, but which can be tweaked to
produce modern LaTeX2e rather than plain TeX. Here are the steps
I did:
1. cp tex.spad.pamphlet latex.spad.pamphlet
and edited it to what I want. It introduces a domain LatexFormat
and a package LatexFormat1.
2. in src/algebra/Makefile.pamphlet, I added ${OUT}/LATEX1.o to
LAYER4 (because TEX1.o is there) and ${OUT}/LATEX.o to LAYER14
(because TEX.o is there), and added the line
latex.spad.pamphlet (LATEX)
to the list of completed spad files at layer 14. I inserted
${OUTSRC}latex.spad into SPADFILES and ${DOC}/latex.spad.dvi
into DOCFILES.
3. in src/algebra/exposed.lsp.pamphlet, I inserted the lines
(|LatexFormat| . LATEX)
(|LatexFormat1| . LATEX1)
4. in src/doc/axiom.bib.pamphlet, I inserted a subsection about
latex.spad.
5. in src/interp/setvars.boot.pamphlet, I inserted a new section
about LaTeX format, by copying the TeX format stuff and editing.
6. I copied setvars.boot.pamphlet into a separate directory,
notangle setvars.boot.pamphlet > setvars.boot
started depsys and said
(boottran::boottocl "setvars.boot")
(bye)
Then I copied the generated int/interp/setvars.clisp into
setvars.boot.pamphlet instead of the lisp piece in
<<setvars.clisp>>
7. in src/interp/setvart.boot.pamphlet, I inserted the line
latex create output in LaTeX style Off:CONSOLE
in the table near the beginning, the line
<<outputlatex>>
in the code chunk <<output>>, and the subsection latex
obtained from tex by copying and editing.
Has I missed anything?
After all that, I said
make
It failed:
--------------------------------------------------------------------------------
2 building warm.data
5 invoking make in /home/grozin/cas/axiom--main--1--patch-45/src/interp with
parms:
SYS= gentoo
LSP= /home/grozin/cas/axiom--main--1--patch-45/lsp
PART= cprogs
SPAD= /home/grozin/cas/axiom--main--1--patch-45/mnt/gentoo
SRC= /home/grozin/cas/axiom--main--1--patch-45/src
INT= /home/grozin/cas/axiom--main--1--patch-45/int
MID= /home/grozin/cas/axiom--main--1--patch-45/int/interp
OUT= /home/grozin/cas/axiom--main--1--patch-45/obj/gentoo/interp
OBJ= /home/grozin/cas/axiom--main--1--patch-45/obj
MNT= /home/grozin/cas/axiom--main--1--patch-45/mnt
O=o LISP=lsp BYE=bye
...
Loading /home/grozin/cas/axiom--main--1--patch-45/obj/gentoo/interp/patches.o
start address -T 0x86df940 Finished loading
/home/grozin/cas/axiom--main--1--patch-45/obj/gentoo/interp/patches.o
Error: Caught fatal error [memory may be damaged]
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by LOAD.
Broken at APPLY. Type :H for Help.
BOOT>>make[3]: ***
[/home/grozin/cas/axiom--main--1--patch-45/obj/gentoo/bin/interpsys] Error 255
make[3]: Leaving directory
`/home/grozin/cas/axiom--main--1--patch-45/src/interp'
make[2]: *** [interpdir] Error 2
make[2]: Leaving directory `/home/grozin/cas/axiom--main--1--patch-45/src'
make[1]: *** [srcdir] Error 2
make[1]: Leaving directory `/home/grozin/cas/axiom--main--1--patch-45'
make: *** [all] Error 2
--------------------------------------------------------------------------------
My next action was
make clean
make
(to be sure that there's no incompatibility with some file
from the normal axiom build). The result is the same.
What can I do next?
In the course of doing all this, I found and corrected a number
of typos in src/algebra/Makefile.pamphlet, src/interp/setvars.boot.pamphlet
and src/interp/setvart.boot.pamphlet . It seems that the stuff about
OpenMath was produced by copying the TeX stuff (just like I'm doing now!),
and was not edited carefully enough. These changes should be incorporated
into the mainline axiom:
--------------------------------------------------------------------------------
diff --recursive -U4 axiom--main--1--patch-45/src/algebra/Makefile.pamphlet
axiom/src/algebra/Makefile.pamphlet
--- axiom--main--1--patch-45/src/algebra/Makefile.pamphlet 2005-09-05
16:34:27.000000000 +0200
+++ axiom/src/algebra/Makefile.pamphlet 2005-09-06 21:49:42.000000000 +0200
@@ -1131,18 +1132,18 @@
\end{verbatim}
\section{The Environment}
\subsection{The working directories}
-We define 5 directories for this build. The{\bf IN} directory
+We define 5 directories for this build. The {\bf IN} directory
contains the pamphlet files for the algebra. These are expanded
-into the{\bf MID} directory as either .spad or .as files. The
+into the {\bf MID} directory as either .spad or .as files. The
.spad files are compiled by the native spad internal compiler.
The .as files are compiled using the Aldor compiler. The output
of the compilation has two purposes. Part of the information is
used to build various database files (daase files). The other
part is executable code which is placed in the {\bf OUT}
directory. When invoked as ``make document'' we construct
-the .dvi files in the{\bf DOC} directory.
+the .dvi files in the {\bf DOC} directory.
The [[OUTSRC=${MNT}/${SYS}/src/algebra]] subdirectory contains the
algebra source files extracted from the pamphlet files. These sources
allow the end user to change the algebra if needed.
diff --recursive -U4 axiom--main--1--patch-45/src/interp/setvars.boot.pamphlet
axiom/src/interp/setvars.boot.pamphlet
--- axiom--main--1--patch-45/src/interp/setvars.boot.pamphlet 2005-09-05
16:29:47.000000000 +0200
+++ axiom/src/interp/setvars.boot.pamphlet 2005-09-06 22:42:20.000000000
+0200
@@ -1388,29 +1388,29 @@
------------------ The openmath Option ------------------------
Description: create output in OpenMath style
- )set output tex is used to tell AXIOM to turn TeX-style output
+ )set output openmath is used to tell AXIOM to turn OpenMath-style output
printing on and off, and where to place the output. By default,
the destination for the output is the screen but printing is
turned off.
-Syntax: )set output tex <arg>
+Syntax: )set output openmath <arg>
where arg can be one of
- on turn TeX printing on
- off turn TeX printing off (default state)
- console send TeX output to screen (default state)
- fp<.fe> send TeX output to file with file prefix fp
+ on turn OpenMath printing on
+ off turn OpenMath printing off (default state)
+ console send OpenMath output to screen (default state)
+ fp<.fe> send OpenMath output to file with file prefix fp
and file extension .fe. If not given,
.fe defaults to .som.
If you wish to send the output to a file, you must issue
this command twice: once with on and once with the file name.
-For example, to send TeX output to the file polymer.som,
+For example, to send OpenMth output to the file polymer.som,
issue the two commands
- )set output tex on
- )set output tex polymer
+ )set output openmath on
+ )set output openmath polymer
The output is placed in the directory from which you invoked
AXIOM or the one you set with the )cd system command.
The current setting is: Off:CONSOLE
diff --recursive -U4 axiom--main--1--patch-45/src/interp/setvart.boot.pamphlet
axiom/src/interp/setvart.boot.pamphlet
--- axiom--main--1--patch-45/src/interp/setvart.boot.pamphlet 2005-09-05
16:35:33.000000000 +0200
+++ axiom/src/interp/setvart.boot.pamphlet 2005-09-06 22:35:07.000000000
+0200
@@ -1906,25 +1908,25 @@
----------------------- The openmath Option ------------------------
Description: create output in OpenMath style
- )set output tex is used to tell AXIOM to turn OpenMath output
+ )set output openmath is used to tell AXIOM to turn OpenMath output
printing on and off, and where to place the output. By default,
the destination for the output is the screen but printing is
turned off.
-Syntax: )set output tex <arg>
+Syntax: )set output openmath <arg>
where arg can be one of
on turn OpenMath printing on
off turn OpenMath printing off (default state)
console send OpenMath output to screen (default state)
fp<.fe> send OpenMath output to file with file prefix fp
and file extension .fe. If not given,
- .fe defaults to .sopen.
+ .fe defaults to .som.
If you wish to send the output to a file, you must issue
this command twice: once with on and once with the file name.
-For example, to send OpenMath output to the file polymer.sopen,
+For example, to send OpenMath output to the file polymer.som,
issue the two commands
)set output openmath on
)set output openmath polymer
--------------------------------------------------------------------------------
Hoping for your help,
Andrey