On 2/21/11, Marco Rofei <marco.rofei at gmail.com> wrote:
> is there a way to get a superscript or subscript before the variable
> letter, like the 0 in the attached image, using the ' operator?
Here's a way to get the pre-superscript in TeX output.
Define a new operator "+^" such that a +^ b means
put b as a superscript before a.
infix ("+^");
texfoo (e) := block ([a, b], [a, b] : args (e), concat ("{}^{", tex1
(b), "}\\!{", tex1 (a), "}"));
texput ("+^", texfoo);
Then we get stuff like this:
tex (A[1] +^ 0);
=> $${}^{0}\!{A_{1}}$$
(I don't any better way to make a pre-superscript in TeX.)
The Maxima console pretty-printer looks for a function to handle
each operator, so we could, with a little Lisp hacking, define a
function for "+^". If you're interested we can get into it.
I think this same topic came up a year or two ago. I don't
remember what anyone might have said about it at the time.
Probably you could search the message archives.
See: http://maxima.sourceforge.net/maximalist.html
best
Robert Dodier