Re: Table format.
- To: mathgroup at smc.vnet.net
- Subject: [mg16696] Re: [mg16647] Table format.
- From: BobHanlon at aol.com
- Date: Sat, 20 Mar 1999 02:09:05 -0500
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 3/19/99 2:52:04 PM, awhopper at hermes.net.au writes: >Is it possible to modify the output of TableForm so as to >get two or more adjacent columns of very long integers >compressed into blocks? As opposed to the normal (with me >at least) output where separate columns of long numbers >are stretched out horizontally, beyond the 'page width'. >This is not suitable for printing and it is annoying to have >to scroll to see the output. > >What I am seeking is something like >this ; > > Column 1 Column 2 > > 25 to 500 digit number As for col.1 > displayed in rows of 25 digits > > >I would prefer some code to program the TableForm output, rather >than having to alter OptionInspecter settings (if that is at all >applicable in this, anyway). > Alan, Here is one approach: form[x_,k_Integer:20] := NumberForm[x,DigitBlock->k, NumberSeparator->"\n"]; x = {{20!, 25!}, {30!, 35!}}; x // TableForm Map[form[#, 10]&, x, {2}]//TableForm Map[form[#]&, x, {2}]//TableForm Bob Hanlon