recursive use of Format
- To: mathgroup at smc.vnet.net
- Subject: [mg7313] recursive use of Format
- From: Bob Young <ryoung at scicomp.com>
- Date: Fri, 23 May 1997 01:41:47 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I am encountering this problem with X unix notebooks. I need to do layout formatting of functions that can occur recursively. When I define a format Format[ zfn[ v1_, v2_]] := FractionBox[ RowBox[ {zzz, "---", v1}], v2]; an input of zfn[ 100, 200] produces a cell for which DisplayForm is correct. Neither FractionBox nor RowBox appear literally in the notebook This cell is, for the details Cell[BoxData[ RowBox[{"FractionBox", "[", RowBox[{ RowBox[{"RowBox", "[", RowBox[{"{", RowBox[{"zzz", ",", "\<\"---\"\>", ",", "100"}], "}"}], "]"}], ",", "200"}], "]"}]], "Output", CellLabel->"Out[70]="] However, an input of zfn[ zfn[ 100, 200], 999] produces a correct display of the inner form, but FractionBox[ Rowbox ...]] does not turn into the graphical form when DisplayForm is applied, again, here is the cell Cell[BoxData[ TagBox[ RowBox[{"FractionBox", "[", RowBox[{ RowBox[{"RowBox", "[", RowBox[{"{", RowBox[{"zzz", ",", "\<\"---\"\>", ",", FractionBox[ RowBox[{"zzz", RowBox[{"--", "-"}], "100"}], "200"]}], "}"}], "]"}], ",", "999"}], "]"}], DisplayForm]], "Output", CellLabel->"Out[72]//DisplayForm="] Any suggestions for a correction or workaround would be much appreciated. Bob Young SciComp Inc 5806 Mesa, Suite 250 Austin, TX 78731 512-451-1434 512-451-1622 (FAX) e-mail: ryoung at SciComp.com http://www.sig.net/~scicomp