axiom-developer
[Top][All Lists]

## (Fwd) Re: [Axiom-developer] Re: converting sexps to XML

 From: michel . lavaud Subject: (Fwd) Re: [Axiom-developer] Re: converting sexps to XML Date: Wed, 29 Jun 2005 21:00:39 +0200

Hello,
Sorry, I forgot to cc this answer to Ralf's message to the list
------- Forwarded message follows -------
Date sent:              Wed, 29 Jun 2005 15:44:14 +0200
Subject:                Re: [Axiom-developer] Re: converting sexps to XML
Priority:               normal

Hello Ralf,

On 29 Jun 2005 at 13:56, Ralf Hemmecke wrote:

> I know a normal LaTeX user wouldn't do that but I am just wondering
> whether AsTeX correctly outputs
>
>    ac
>
> (no equals sign, no b, no d) if I select the align* environment from
> the following file.
>
> \documentclass{article}
> \usepackage{amsmath}
> \catcode\&=14% & is now a character introducing a comment like %.
> \begin{document} \begin{align*}
>    a&=b\\
>    c&=d\\
> \end{align*}
> \end{document}
>
> TeX is a programming language. No character has a fixed meaning. One
> can even redefine \ (backslash). Any parser of LaTeX code that is
> not TeX (the program) itself will sooner or later run into trouble.
> The only way out would be to restrict to some subset of (La)TeX.

Yes, it works without any problem. I send you two screen copies as
attached files, one of the original location of your portion of text,
as selected directly in my mailer. And a second, a copy of the dvi
windows that displays the correct output.

The purpose of AA is to work with any TeX-like input, so it uses TeX
itself, not a LaTeX parser, and it works also with Plain TeX and
TeXinfo. It works with an input file with "beg" extension, that
contains or loads the special definitions used for the document. For
your example, I have just added amsmath and the \catcode line in the
default file latex2e.beg. But if you have different documents, for
example two books you are writing in parallel, with (let's consider
the worst case) different and even incompatible macros, you can add
these definitions in two files with beg extension and the names of the
main files of your two books. If an xyz.beg file exists for the book
xyz.tex, the xyz.beg file is used. Otherwise, the default file
latex2e.beg file is used, or plain.beg file if you use Plain TeX for

And the type of the file xyz.tex (Plain or LaTeX) is stored in another
initialisation file xyz.env. The latter stores also other informations
(such as paths for tfm, TeX format, paths of figures, type of
compilation etc.) necessary to compile the document. As for beg files,
there is also a default env file that stores default values if xyz.env
is not defined.

To summarize the steps I used :

1 - I opened your message in my mailer (Pegasus mail)
2 - I clicked on the button "Head L2e" of the panels of AA devoted to
TeX treatment; that opened the header file latex2e.beg 3 - I added the
two lines indicated above in this file latex2e.beg and saved the
modifs 4 - I selected "Pegasus mail" as input window in AA 5 - I
selected the 4 lines to be displayed in the align* environment.

The first 3 steps have to be done only once - or each time you add a
LaTeX package, or define your own macro if everything was not planned
from the beginning. The 4th step is used only once, when you change
the source window, for ex when you change from Emacs to Pegasus mail,
or to Word, etc.

Best wishes,
Michel
------- End of forwarded message address@hidden
http://www.univ-orleans.fr/EXT/ASTEX
ftp://ftp.univ-orleans.fr/pub/tex/PC/AsTeX
Abonnement à la liste: envoyer un message de contenu
"sub astex Nom Prenom Etablissement" à address@hidden


The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.

---- File information -----------
File:  Redimensionnement de Ralf01.jpg
Date:  29 Jun 2005, 15:03
Size:  57347 bytes.
Type:  JPEG-image


Redimensionnement de Ralf01.jpg
Description: JPEG image

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.

---- File information -----------
File:  Redimensionnement de Ralf02.jpg
Date:  29 Jun 2005, 15:04
Size:  10549 bytes.
Type:  JPEG-image
`

Redimensionnement de Ralf02.jpg
Description: JPEG image