axiom-developer
[Top][All Lists]

## [Axiom-developer] LaTeX output

 From: Andrej Grozin Subject: [Axiom-developer] LaTeX output Date: Thu, 18 Mar 2004 06:25:41 +0100 (CET)

Hello *,

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?

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. 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).

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.

Which approach seems better to you?

Andrey Grozin



reply via email to