Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12487
| From | Roland Franzius <roland.franzius@uos.de> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Superscript on plus expression |
| Date | 2012-11-28 08:15 +0000 |
| Message-ID | <k94h68$bfi$1@smc.vnet.net> (permalink) |
| References | <20121117084935.868E56AF3@smc.vnet.net> <19898081.6403.1353229345311.JavaMail.root@m06> <000301cdc668$e3ec8740$abc595c0$@comcast.net> <k91u8h$5l1$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
Am 27.11.2012 09:39, schrieb Dave Snead:
> Hi,
>
> How can I get Mathematica to parenthesize the sum in
> Superscript[Plus[a,b],k] ?
Seems to be impossible to intercept output of Superscript by Format.
Defining
Format[superscript[a_Plus,b_]]:= Superscript[MatrixForm[{a}],b]
is working.
One may catch Superscript[Plus ,..] by postprocessing output:
$Post=
If[ MatchQ[#,Superscript[_Plus,_],
(MapAt[MatrixForm[{#}]&), #, 1],
#]&
Superscript is a special text case because the input parser reads it as
power, which is a pain for index gynm. On the other hand even in text
cells it is not possible to avoid brackets in mixed tensor index
super/subscripts.
Probably, the best way is to write a tensor index Format routine with
a List of {index-x-position,index-y-position, indexvalue} for each
index, a task not a too difficult with MakeBoxes.
--
Roland Franzius
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Superscript on plus expression "Dave Snead" <dsnead6@charter.net> - 2012-11-27 08:39 +0000 Re: Superscript on plus expression Roland Franzius <roland.franzius@uos.de> - 2012-11-28 08:15 +0000 Re: Superscript on plus expression awnl <awnl@gmx-topmail.de> - 2012-12-03 08:18 +0000
csiph-web