       Re: Math Formulas

• To: mathgroup at smc.vnet.net
• Subject: [mg92719] Re: Math Formulas
• From: David Bailey <dave at Remove_Thisdbailey.co.uk>
• Date: Sat, 11 Oct 2008 06:45:15 -0400 (EDT)
• References: <gckn71\$noe\$1@smc.vnet.net>

```John wrote:
> Mathematica 6, WindowsXP
>
>  NotebookPut[
>  Notebook[{Cell["October 7, 2008", "Text", TextAlignment -> 1,
>     FontSize -> 24, Bold,
>     CellMargins -> {{Inherited, Inherited}, {50, Inherited}}],
>    Cell["Probability Of Acceptance", "Section", "Text",
>     CellFrame -> False,
>     CellMargins -> {{Inherited, Inherited}, {4, 3}}],
>    Cell["Use the formula,", "Text", TextJustification -> 1,
>     Hyphenation -> True, FontSize -> 16, Bold, CellFrame -> False,
>     CellMargins -> {{Inherited, Inherited}, {10, Inherited}}],
>    Cell[BoxData[
>      RowBox[{ RowBox[{"(", GridBox[{{"c"}, {"i"}}], ")"}],
>        SuperscriptBox["p", "i"],
>        SuperscriptBox["(1-p)", "c-i"]}] ] ,        "Text",
>     FontSize -> 16, Bold, TextJustification -> 1, Hyphenation -> True,
>      CellMargins -> {{Inherited + 35, Inherited}, {10, Inherited}}],
>    Cell["to compute the probability that acceptance sampling deems a \
> lot to be acceptable. Values of n, c amd p are specified by the \
> user.", "Text", FontSize -> 16, Bold, TextJustification -> 1,
>     Hyphenation -> True, CellFrame -> False,
>     CellMargins -> {{Inherited, Inherited}, {10, Inherited}}]}]]
>
> The cell that prints the  formula was suggested to me by Bob. It
> prints the formula correctly.
> My attempts to insert a summation sign in front of the formula failed.
> The command
>
>     Sum[f,{i,0,c}]
>
> didn't do the job. Maybe I didn't put it in the right place.
>
> Latex formulas are elegant (suitable for framing). Can Mathematica
> match the elegance of Latex? If so I want to know how to do it.
>
> John
>
>
>

1)   Carefully decide what it is you want to do.

2)   Look at some of the documentation and think about how what you want
to do differs from the thousands of examples that are already there.

to us what it is that you want to do, and how it differs from all the
existing examples.

4)   Tell us why you think NotebookPut is relevant to your problem!

5)   Understand that Mathematica tries to evaluate expressions when it
can. Thus in the sum that you entered the summand does not depend on i,
and the sum gets trivially evaluated. If you try the following
expression, you might see something more interesting (assuming you have
not somehow defined f, and don't bury the expression in a call to
NotebookPut!).

Sum[f[i], {i, 0, c}]

People are pretty patient here, but ultimately they give up trying.

David Bailey
http://www.dbaileyconsultancy.co.uk

```

• Prev by Date: Re: Why is Mathematica assuming k==l and how do I make it
• Next by Date: Re: Overlapping binning of differences of two lists
• Previous by thread: Re: Math Formulas
• Next by thread: Re: Math Formulas