axiom-developer
[Top][All Lists]

## Re: [Axiom-developer] TeX output of a**bc

 From: William Sit Subject: Re: [Axiom-developer] TeX output of a**bc Date: Wed, 11 Jul 2012 16:39:56 -0400

In the case c is literally an integer, and b is a symbol, then most likely c is meant to be a single subscript---of course, it could also be a superscript, but we can't tell. For subscript, the TeX code would be $a^{b_{c}}$. If c is meant to be a double subscript, like b13 to mean b_{1,3}, then it may be necessary to pass the integer string c.


Rather than guessing what the user has in mind, in case it is a^b13, I think your workaround a^{b13} is fine. Or you can use \verbatim to capture Axiom input and output lines.

William

On Wed, 11 Jul 2012 21:10:28 +0200

Yes, indeed. I didn't even think of the interpretation as a^{b c} because in fact c were integers in my examples, so it didn't attract much attention when rendered, but it's definitively not to distinguish
when c is literal. I have to review my workaround.

Thank you for pointing this out.
Kurt

Am 11.07.2012 19:48, schrieb William Sit:

In TeX, a^bc would be interpreted mathematically as (a^b)c, whereas a^{bc} would be interpreted as a^{b c}, where the exponent is a product of b and c, or an application of b on c. Neither interpretation is what
is intended if bc is a single identifier.


One would need something like a^{\rm bc}, but even that is possibly
ambiguous; but some change in font is needed.

William

On Tue, 10 Jul 2012 21:48:10 +0200

Hello,


by accident I noticed the following irregularity in the TeX output
(missing {}):

a**bc (or a^bc).

Axiom:
$$a^bc \leqno(4)$$

OpenAxiom, Fricas:
$$a \sp bc \leqno(6)$$

Usually, one uses only one character variables :)

I'm using Axiom mostly via Python (TeXmacs, IPython) so that
 re.sub(r"\\sp ([^ \t\r\n\f\v\\]*)", r"^{\1}", tex)
is a workaround for the moment.

Cheers
Kurt

_______________________________________________
Axiom-developer mailing list
https://lists.nongnu.org/mailman/listinfo/axiom-developer


William Sit, Professor Emeritus
Mathematics, City College of New York
Office: R6/291D Tel: 212-650-5179





William Sit, Professor Emeritus
Mathematics, City College of New York
Office: R6/291D Tel: 212-650-5179