Skip to main content
added 831 characters in body
Source Link
Mike Honeychurch
  • 37.8k
  • 3
  • 87
  • 161

Typesetting in Text cells

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x","~"], 
       "j", "i"],
       "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{LimitsPositioning->False},
 OverscriptBoxOptions->{DiacriticalPositioning->True},
 FractionBoxOptions->{AllowScriptLevelChange->False}]

gives

enter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox, OverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.

Typesetting in Input cells

Wrapping TraditionalForm around your expression, as per your updated question, is intended to render the output as traditional form. However your question seems to be framed around having traditional looking equations that -- based on your update -- can be evaluated.

If you want all you input and output to appear like this then set this globally in your preferences:

enter image description here

Then in your input cells you can type the equation and it will appear in traditional form:

enter image description here

If you only want to convert certain cells then either make the changes via the menu Cell > Convert To or via a right click:

enter image description here

which produces:

enter image description here

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x","~"], 
       "j", "i"],
       "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{LimitsPositioning->False},
 OverscriptBoxOptions->{DiacriticalPositioning->True},
 FractionBoxOptions->{AllowScriptLevelChange->False}]

gives

enter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox, OverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.

Typesetting in Text cells

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x","~"], 
       "j", "i"],
       "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{LimitsPositioning->False},
 OverscriptBoxOptions->{DiacriticalPositioning->True},
 FractionBoxOptions->{AllowScriptLevelChange->False}]

gives

enter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox, OverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.

Typesetting in Input cells

Wrapping TraditionalForm around your expression, as per your updated question, is intended to render the output as traditional form. However your question seems to be framed around having traditional looking equations that -- based on your update -- can be evaluated.

If you want all you input and output to appear like this then set this globally in your preferences:

enter image description here

Then in your input cells you can type the equation and it will appear in traditional form:

enter image description here

If you only want to convert certain cells then either make the changes via the menu Cell > Convert To or via a right click:

enter image description here

which produces:

enter image description here

added 71 characters in body
Source Link
Mike Honeychurch
  • 37.8k
  • 3
  • 87
  • 161
Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x", "~"], 
       "j", "i"], 
       "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{LimitsPositioning->False},
 OverscriptBoxOptions->{DiacriticalPositioning->True},
 FractionBoxOptions->{
 AllowScriptLevelChange->False}]

gives

enter image description hereenter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox, OverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x", "~"], "j", "i"], 
      "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{
 DiacriticalPositioning->True},
 FractionBoxOptions->{
 AllowScriptLevelChange->False}]

gives

enter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x","~"], 
       "j", "i"],
       "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{LimitsPositioning->False},
 OverscriptBoxOptions->{DiacriticalPositioning->True},
 FractionBoxOptions->{AllowScriptLevelChange->False}]

gives

enter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox, OverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.

Source Link
Mike Honeychurch
  • 37.8k
  • 3
  • 87
  • 161

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   FractionBox["1", "N"], 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "1"}], "N"], 
    FractionBox[
     RowBox[{
      SubsuperscriptBox[
       OverscriptBox["x", "~"], "j", "i"], 
      "(", 
      RowBox[{"k", "|", "k"}], ")"}], 
     SqrtBox[
      RowBox[{
       SubscriptBox["P", "jj"], "(", 
       RowBox[{"k", "|", "k"}], ")"}]]]}]}], 
  TraditionalForm]]]], "Text",
 UnderoverscriptBoxOptions->{
 DiacriticalPositioning->True},
 FractionBoxOptions->{
 AllowScriptLevelChange->False}]

gives

enter image description here

This was typeset in a text cell by starting with Ctrl-9 and then typing

enter image description here

The default ScriptLevel for inline cells is 1 so I set that to 0 in a private style (Format > Edit Stylesheet):

enter image description here

The additional UnderoverscriptBox and FractionBox options were set via the option inspector. You can do additional tweeking by nudging terms around via Insert > Typesetting.