Re: Superscript on plus expression
- To: mathgroup at smc.vnet.net
- Subject: [mg128809] Re: Superscript on plus expression
- From: Roland Franzius <roland.franzius at uos.de>
- Date: Wed, 28 Nov 2012 03:14:34 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20121117084935.868E56AF3@smc.vnet.net> <19898081.6403.1353229345311.JavaMail.root@m06> <000301cdc668$e3ec8740$abc595c0$@comcast.net> <k91u8h$5l1$1@smc.vnet.net>
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
- References:
- Plotting a series of Roots
- From: William Duhe <wjduhe@loyno.edu>
- Plotting a series of Roots