Re: Automatic Display in MatrixForm
- To: mathgroup at smc.vnet.net
- To: mathgroup at smc.vnet.net
- Subject: [mg19294] Re: Automatic Display in MatrixForm
- From: Colin Rose <colin at tri.org.au>
- Date: Thu, 12 Aug 1999 22:34:48 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Ted Ersek wrote: > Dave Withoff's recommended solution is given below, and I know > of no problems with it. MakeBoxes[m_? (Function[t, MatrixQ[Unevaluated[t]]&&(t=!={{}}),HoldAll]), StandardForm]:= RowBox[{"(", GridBox[ Map[Function[t, MakeBoxes[t, StandardForm], HoldAll], Unevaluated[m],{2} ] ], ")"}] Delicious. This even works for TableForm[m]. Now, suppose I included the above code in a package, and thus changed Mathematica's default behaviour for all matrix output in StandardForm. Being a good citizen, I realise that some people may not like it, so I want to offer a way to switch it off ... In this regard, Clear[MakeBoxes] works nicely, but is it too general ? Or is there a more specific way to switch the above off, without altering other MakeBoxes[] code that may have been introduced elsewhere by the user ?? Cheers Colin Colin Rose tr(I) - Theoretical Research Institute __________________________________________ colin at tri.org.au http://www.tri.org.au/