axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] LaTeX output


From: Andrey G. Grozin
Subject: Re: [Axiom-developer] LaTeX output
Date: Wed, 3 Nov 2004 17:18:52 +0600 (NOVT)

On Wed, 3 Nov 2004, Christopher Chamber wrote:
> I've installed a recent cvs axiom, and made some experiments with the
> LaTeX generation stuff. I replaced some of very old plain TeX constructs
> by their modern LaTeX forms, like
> 
> {x \over y} -> \frac{x}{y}
> {x \sp y} -> {x}^{y}
> {\root n \of x} -> \sqrt[n]{x}
> 
> Is there any reason to retain the old plain-TeX output? Does anybody
> need it, or it can be replaced by the proper LaTeX output?
> 
> Use of $$...$$ in LaTeX is discouraged. I propose to replace it by
> \[...\] . Comments?
I did the same thing some time ago, and asked the list. I was told that 
there is a chance of re-introducing the Axiom interface to some 
closed-source Windows-only thing (don't remember its name), and because of 
this (remote) chance we cannot touch anything in Axiom's TeX generation.

> The main reason I'm doing this is, of course, the TeXmacs interface. The
> current setup, where axiom outputs old plain-TeX constructs, and tm_axiom
> tries to parse it back (!!!) and replace by proper LaTeX constructs, is
> unsatisfactory; it is much better to fix the problem, not to build
> complicated workarounds.
This is my motivation, too. The current situation is completely crazy. 
tm_axiom must die (though it was me who wrote it initially).

> I see 2 possible ways to make this interface
> better:
> 
> 1. Either I duplicate the LaTeX generation code to TeXmacs generation
> code, make adjustments, and introduce a new command
> )set output texmacs on
> (haven't looked at the code which processes system commands, but I'm sure
> this must be not too difficult).
This is exactly what I'm going to do when I'll have a little free time.
We need one more thing: parametrized prefixes and suffixes for all prompts 
Axiom can generate. I haven't studied the interpreter code in any detail, 
but I suppose this also should be not too difficult.

Maxima has recently done this. In the words of James Amundson, its leading 
developer, Maxima interfacing has moved from the stone age (parsing output 
to find prompts, brr... this was done by an ugly maxima_filter I wrote) to 
the bronze age (via parametrized prefixes/suffixes, maxima can now 
communicate with any front-end directly, including TeXmacs). James 
proposes to move directly to the Enlightment (corba).
Axiom interface is still firmly in the stone age. There were attempts to 
move it still deeper into paleolith by incorporating more 
parsing/rewriting into tm_axiom; they were, fortunately, not accepted by 
Joris van der Hoeven. Let's move to the bronze age, following the maxima's 
example.


> 2. Or I make LaTeX generation parametrized. The number of required
> differences is small: for TeXmacs, it is essential to generate \* for
> multiplication, while for ordinary LaTeX, this should be either nothing
> or, perhaps, \, ; TeXmacs stuff like \2latex: should be in the prelude and
> the matching \5 at the end; maybe, a few other trivial points. I can
> introduce a global variable latexMultiplicationString, for example, and
> assign "\*" to it for TeXmacs and "\," (or "") for LaTeX. Or I can collect
> all such hook strings into a Record, and have latexHooks and texmacsHooks
> with all settings.
Yes, I also thought about this approach. It has one clear advantage: 
whenever some bug is fixed in the TeX generation, this fix appears in the 
TeXmacs generation, too. If we fork the TeX generation code, we'll have to 
trace its changes by hand.

Andrey Grozin




reply via email to

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