$OutputForms

The $OutputForms usage message is shown below.

? $OutputForms

$OutputForms is a list of the formatting functions that get stripped  off when wrapped around the output.

m = MatrixForm[Inverse[{{1, 2, 0}, {0, 2, 3}, {1, 2, -1}}]]

(              )            4    -1   -3             3   1    3           --   -    -            2   2    2              1    0    -1

Notice Head[m] returns MatrixForm, but Head[%] retunrs List.

{Head[%], Head[m]}

{List, MatrixForm}


The next cell removes MatrixForm from the list assigned to $OutputForms.

Unprotect[$OutputForms] ;  $OutputForms = Complement[$OutputForms, {MatrixForm}]

{AccountingForm, BaseForm, CForm, DisplayForm, EngineeringForm, FortranForm, FullForm, InputFo ...  Shallow, Short, StandardForm, StyleForm, TableForm, TeXForm, TextForm, TraditionalForm, TreeForm}

m = MatrixForm[Inverse[{{1, 2, 0}, {0, 2, 3}, {1, 2, -1}}]]

(              )            4    -1   -3             3   1    3           --   -    -            2   2    2              1    0    -1


Now that MatrixForm isn't in the list returned by $OutputForms, we get
MatrixForm for Head[%] and Head[m].

{Head[%], Head[m]}

{MatrixForm, MatrixForm}

The next cell restores the default setting of $OutputForms.

$OutputForms = Union[$OutputForms, {MatrixForm}] ;


Created by Mathematica  (May 16, 2004)

Back to Ted’s Tricks index page