On Thu, 17 Mar 2005, Barton Willis wrote:
> Aside from the bugs in your code, the mactex version of tex-stripdollar
> does two things that your code doesn't. First, tex-stripdollar checks
> *tex-translations* to see if it should do a translation. Second,
> tex-stripdollar does things like x3 --> x_3. Your code doesn't try
> to do either. Why?
Here is a more detailed motivation.
The following two situations differ very much:
1. A user runs command-line maxima (or xmaxima, or whatever), and wants to
convert a single formula (or a few formulae) into TeX. She wants as much
control as possible, to produce TeX output for incluning into some paper.
Consistency of notations with those used in the maxima session is of
little importance.
2. A user runs maxima from TeXmacs. *All* maxima output is produced via
tex(...) and rendered by TeXmacs. In this case, the highest priority is
*unambiguity* of the produced output.
Consider this:
(%i3) tex(x[1]);
$$x_{1}$$
(%o3) false
(%i4) tex(x1);
$$x_1$$
(%o4) false
This is *absolutely unacceptable* when the tex(...) output is the only
form of the results the user can see.
By the way, I've already produced a working TeXmacs-maxima interface for
recent cvs maxima. I'll send it today, after fixing the bug with tex(x_1):
this fix should be both in the standard mactex and in
texmacs-maxima-x.y.z.lisp. I suppose that the behaviour we want is
tex(x_y) -> $$x\_y$$
tex(x_1) -> $$x\__1$$
Right?
More to follow soon.
Andrey