RE: StyleForm
- To: mathgroup at smc.vnet.net
- Subject: [mg14369] RE: [mg14258] StyleForm
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Thu, 15 Oct 1998 00:29:08 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Earlier Allan Hayes answered a question about StyleForm. In that answer
Allan wrote:
>
>Your results arise from the way that $OutputForms evaluate. These forms are
used to alter the way >in which expressions are displayed. In principal
they should not affect value and output but in >fact they can do so. A
complet list of them is.
>
>In[1]:=
>$OutputForms
>Out[1]=
>{InputForm,OutputForm,TextForm,CForm,
>Short,Shallow,MatrixForm,TableForm,
>TreeForm,FullForm,NumberForm,
>EngineeringForm,ScientificForm,PaddedForm,
>AccountingForm,BaseForm,DisplayForm,
>StyleForm,FortranForm,TeXForm,
>StandardForm,TraditionalForm}
>
>
_____________________________
In my opinion $OutputForms does
more harm than good. $OutputForms
causes the confusing result at Out[3].
In[2]:=
m1=MatrixForm[{{1,2},{3,4}}]
Out[2]=
(* output not shown *)
In[3]:=
{Head[%],Head[m1]}
Out[3]=
{List,MatrixForm}
The effect is similar for other heads listed in $OutputForms. I prefer
use the lines at In[4] to do away with all this confusion. Now I get
results I am satisfied with at Out[6].
In[4]:=
Unprotect[$OutputForms];
$OutputForms={};
Protect[$OutputForms];
In[5]:=
m2=MatrixForm[{{6,7},{8,9}}]
Out[5]=
(* output not shown *)
In[6]:=
{Head[%],Head[m2]}
Out[6]=
{MatrixForm,MatrixForm}
_________________________
You can put the lines at In[4] in your init.m, and they will evaluate
automatically when Mathematica is started.
Cheers,
Ted Ersek