Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Pascal's triangle spacing is off. Need DigitCount?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121211] Re: Pascal's triangle spacing is off. Need DigitCount?
  • From: Christopher Young <cy56 at comcast.net>
  • Date: Sun, 4 Sep 2011 04:14:03 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201109031204.IAA05249@smc.vnet.net> <9C709B2D-E064-4D91-A14C-67B9909267BD@gmail.com>

Thanks, I stumbled upon that after fiddling around for a while. Seems to me it would be a handy option to have in Row[ ], also.

On Sep 3, 2011, at 5:01 PM, Heike Gramberg wrote:

> You could use Grid  in combination with ItemSize instead of Row to give all the entries the same width, e.g.
>
> pascalTrngl2[n_] :=
> Module[{max, sp}, max = Max[Table[Binomial[n, j], {j, 0, n}]];
>  sp = Round[N[Log[10, max], 5]];
>  Column[Table[Grid[{Table[Binomial[i, j], {j, 0, i}]},
>     ItemSize -> sp], {i, 0, n}], Center]]
>
> pascalTrngl2[10]
>
> Heike

Chris Young
cy56 at comcast.net



  • Prev by Date: Re: Quit versus Clear["Global`*"]
  • Next by Date: Re: Assembling PDFs into a PDF document?
  • Previous by thread: Pascal's triangle spacing is off. Need DigitCount?
  • Next by thread: Re: Pascal's triangle spacing is off. Need DigitCount?