Re: PaddedForm-like behavior for GridBox[]

*To*: mathgroup at smc.vnet.net*Subject*: [mg63394] Re: PaddedForm-like behavior for GridBox[]*From*: albert <awnl at arcor.de>*Date*: Thu, 29 Dec 2005 02:57:26 -0500 (EST)*References*: <dotpg5$fq$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Steven T. Hatton wrote: > There must be a connection I'm not making. It seems as if half the > functionality a person would want for printing nicely formatted > tables/grids is in TableForm[], and the other half is in GridBox[]. To > get them to work together seems nontrivial. > > Is there a good source on how to use these features? I'm actually very > surprised at the apparent limitations of Mathematica regarding the > fromatting of output. All the pieces are here, but they don't seem well > integrated. Maybe there are other possibilities, but whatever they are they are not obvious and I also have often missed to be able to specify some of the GridBox Options within TableForm. My guess is that this has historical reasons. After all there are no gridlines available on text-only-frontends, and TableForm seems to have existed even before the notebook-frontends were there... Anyway, as usual, there are workarounds, e.g.: DisplayForm[ToBoxes[TableForm[{{a, b}, {c, d}}, TableHeadings -> {{"row1", "row2"}, {"col1", "col2"}}]] /. GridBox[l_, o___] :> GridBox[l, RowLines -> True, ColumnLines -> 4, GridFrame -> 2, o ]] of which you could make a function, probably using the FilterOption-Package to sort out which options go where. Be aware that the GridBox-Options will be ignored on a text only frontend... hth albert