axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] LaTeX output


From: Christopher Chamber
Subject: [Axiom-developer] LaTeX output
Date: Wed, 3 Nov 2004 09:12:06 +0000
User-agent: Internet Messaging Program (IMP) 3.2.1


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?
-----------------------
Christopher Chamber
http://gem-hs.org/c.html




reply via email to

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