RE: [Aimmath-developers] Sorry ... new bug in LaTeX translation
Brought to you by:
gustav_delius,
npstrick
|
From: Greg G. <gr...@ma...> - 2003-09-15 02:49:56
|
Before I get into this, I want to thank you for the nice job you did
WhatsNewInV3.txt (I was a bit amused by your comment that it was a bit
rough). It was good enough that I didn't bother to add to it ... maybe
I'll add something when I'm happy with what happens with ``.
On Sun, 14 Sep 2003, Ken Monks wrote:
GG> Sorry but there still seem to be problems with the new LaTeX routines.
GG> ...
GG> I'm guessing that either the change is due to a missing eval somewhere
GG> or changes made to the `aim/LaTeX` routines to make the Inert package
GG> work. Is it possible, to have the old behavior without breaking Inert?
>
> This had nothing to do with Inert. As I said before, Inert is completely
> independent of the default latex formatting routines... adding Inert did not
> cause ANY of the latex formatting problems and bugs that we have fixed
> recently because it is a completely separate formatting system.
No, no ... I wasn't suggesting that the changed behaviour was due to
Inert. I was pretty sure it was changes in the `aim/LaTeX` routines.
I was speculating that to make something work in the Inert package a
change in `aim/LaTeX` was made.
> The built-in Maple command latex(``) causes an error in Maple itself (try it
> in a worksheet) in Maple 8 and 9, but not in Maple 7. In all three versions
> of Maple the command latex(``||(-1)) returns \mbox {{\tt `-1`}}.
Ah! Well this really is wrong IMO, since ``||(-1) is of type symbol and
should be treated like other symbols (except maybe I can see that it might
be appropriate to set them in tt font ... but the `` shouldn't be there
IMO). Anyway, so the problem lies at Maple's door. They are really bad in
listing the changes they make between versions.
> So the
> behavior you are describing is not an AIM bug, but rather the default Maple
> behavior for the latex command in versions 7,8,9. The reason you got away
> with it in the past is that we had been overriding `latex/latex/symbol` in
> aim/LaTeX/mpl with an old routine, probably a modified version of the one
> supplied with Maple 5, which had different behavior.
Thanks for the explanation. Thanks also for the detailed explanation
you gave before about the overrides. I had been using the `` trick for a
while, and then I noticed a comment in the code made by Neil about it.
> The problem with
> overriding built-in Maple routines is that as Maple updates the routines, we
> aren't getting the updates in our overrides.
Yes, true ...'cept sometimes Maple gets it wrong ... and IMO they got it
wrong this time. Incidentally, does the Maple 5 definition of
`latex/latex/symbol` upset Inert? Does Inert need the Maple 7, 8, 9
definition of `latex/latex/symbol`?
> Our recent problems with formatting complex numbers, ln, and producing
> "\sin" vs "sin", were all a result of trying to use old routines to override
> the routines for newer versions of Maple. To fix the "\sin" bug I deleted
> the override to `latex/latex/symbol` and that fixed the problem. It also
> meant that the latex formatting of `` and ``||(-1) both reverted to the
> Maple defaults for Maple 7,8, and 9, which is the behavior you describe. So
> the changes you experienced are due to changes in the way Maple formats
> those expressions, not changes we made to those routines in AIM.
>
> So what I did just now was modify the Maple 7 version of
> `latex/latex/symbol` so it no longer puts `` around nonstandard symbols like
> ``||(-1) and so it returns NULL for the symbol ``. This seems to do the
> trick in Maple 9 and returns the old AIM formatting behavior you desire. I
> can't test it in Maple 8 or 7 though. I committed the changes to the head
> branch, not to the 3.0 release branch, so I'll leave it up to you to commit
> it to the 3.0 branch if it works for you under 7 and 8. I think the bug fix
> for formatting `` is definitely an improvement, but I have mixed feelings
> about the lack of quotes around all nonstandard symbols, though I can't
> think of a situation where that might be a problem offhand. You might want
> to look at the code for `latex/latex/symbol` in aim/LateX.mpl and see if it
> looks like the change might affect anything else before committing to the
> main release branch.
I'm still getting the `` in one of my Trig examples. So I don't think this
is fixed yet, but thanks, with all the info. you've given I think I'll be
able to sort it out. I've got a tut. now ... so I'll have to look at it
later on.
Regards,
Greg
|