Andrey G. Grozin wrote:
> On Thu, 17 May 2007, Vadim wrote:
>
>> in TexMacs when I do
>> alpha[0];
>> I see small greek letter alpha with lower index zero.
>
> I think you should distinguish computations in the maxima language and
> typesetting (though front-ends like TeXmacs try to minimize the
> difference, it never actually disappear). While you are doing
> computations and maxima programming, don't bother too much about
> typesetting; when you fine-tune typesetting for a final publication,
> don't do computations.
I do computations, but TeXmacs interface is so much appealng, so I tried
to catch both aspects simultaneously.
>
> I particular, alpha[0] is not a variable, from the point of view of
> maxima language. It is an array reference to which no value has been
> assigned. In most cases, it can be used just like a variable, but not
> always.
I was aware that a[i] means i-th element of array.
However Maxima's output (both ascii-art and tex) gives an idea of using
arrays elements as indexed variables.
So I thought of this as of design decision.
>
>> 1. How do I specify *upper* indicies?
>
> No way. The TeXmacs-maxima interface tries to ensure that the output
> can be cut-and-pasted into an input; an upper index would be
> interpreted as raising to a power.
>
> Tensor packages have their own concept of upper and lower indices.
> There are some functions to display tensor expressions with indices.
> If you want tensors, use one of the tensor packages available in maxima.
this makes much sence.
However, given that array indexes are shown by Maxima as subscripted,
then I humbly come with a design proposal.
Is it possible for Maxima to show array-indexes superscripted if they
are starting with underscore "_"?
>
> If you need an array with 2 indices, use an array: alpha[i,j]. If you
> need a variable, use a variable: alphaij or alpha_i_j or whatever.
BTW TeXmacs displays alpha_i_j as
alpha'i'j
Is there any interpretation of such displaying?
Thank you.
Vadim.