Subject: "depends" problem of variables with subscripts
From: Robert Dodier
Date: Mon, 9 Jul 2007 20:53:23 -0600
On 7/9/07, Vadim <vadim at vkonovalov.ru> wrote:
> declare_output_tex(d_0_psi_3, "\partial _0 \psi^3");
I believe you want the texput function:
texput (d_0_psi_3, "\\partial _0 \\psi^3");
tex (d_0_psi_3);
=> $$\partial _0 \psi^3$$
> also optionally following:
>
> declare_output_ascii(d_0_psi_3, "subsup d 0 psi 3");
There is no way (short of Lisp programming) to do that at the moment.
It would be straightforward to modifiy MSIZE-ATOM (for 1-d output)
and DIMENSION-ATOM (for 2-d output) to inspect atoms for the
properties GRIND and DIMENSION, respectively, which at present
are sought only for operators in expressions.
An alternative which might make less of a mess is to modify
NFORMAT (which massages expressions before output) to
look for a property, say NFORMAT, and branch on that.
At present NFORMAT is just a big list of special cases.
If I had to choose I think I would suggest extending NFORMAT.
I think someone mentioned that.
HTH
Robert Dodier
PS. It turns out there is a way to make an arbitrary string appear
in place of an atom ... This isn't very pretty. For the record:
nofix (d_0_psi_3);
:lisp (setf (get '$d_0_psi_3 'dissym) (coerce "\\partial _0 \\psi^3" 'list))
d_0_psi_3;
=> \partial _0 \psi^3