Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

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/


 






  • Prev by Date: circumference of an ellipse
  • Next by Date: Re: Re: Re: equaltity of lists
  • Previous by thread: Re: Automatic Display in MatrixForm
  • Next by thread: Re: Re: Automatic Display in MatrixForm