Menu

#4696 tex and lurkmathml typeset itensor output incorrectly

None
open
5
6 days ago
6 days ago
Leo Butler
No

In hodge.dem, the input line:

ishow(canform(hodge(%)))

produces the output (I print the Lisp sexp, because it is otherwise hard to see that %1 %2 %3 %4 is single symbol):

((MTIMES SIMP) ((RAT SIMP) 1 6) ((MEXPT SIMP) $LEVI_CIVITA #:|$%1 %2 %3 %4|) (($G ARRAY) #:|$%1 %102|) ((|$a| ARRAY) #:|$%2 %3 %4|))

It seems clear that 4 and 102 are not subscripts. But both tex and mathml treat them as such:

```
(mfuncall '$mathml '((MTIMES SIMP) ((RAT SIMP) 1 6) ((MEXPT SIMP) $LEVI_CIVITA #:|$%1 %2 %3 %4|)
(($G ARRAY) #:|$%1 %102|) ((|$a| ARRAY) #:|$%2 %3 %4|)))

g %1 % 102 A %2 %3 % 4 levi_civita %1 %2 %3 % 4 6

```

and

(mfuncall '$tex (caddr +)) $${{g_{{\it \%1 \%}_{102}}\,A_{{\it \%2 \%3 \%}_{4}}\,{\it levi\_civita}^{ {\it \%1 \%2 \%3 \%}_{4}}}\over{6}}$$

We see that both the 4 and 102 are treated as subscripts, which seems wrong.

I am inclined to think that the itensor output is wrong and instead of constructing a symbol like #:|$%1 %102|, it would be better to add a space at the end to prevent subscripting.

Patch attached.

1 Attachments

Discussion


Log in to post a comment.

MongoDB Logo MongoDB