The following line produces an output with the text "Pi" displayed instead of the symbol (greek letter) $\pi$.
Code line:
FractionBox[π,2] // DisplayForm
All help with an alternative or correction of this would be much appreciated, thank you.
Responding to a question below here is an image of how FractionBox
enters an equation display. The first line produces an unintended rearrangement of the fraction in the sum. The second line is the intended result. There is no calculation intended, only display.
Here are the code lines
Sum[(-1)^n * StieltjesGamma[n]/n! *
Subscript[B, n + 1][-I c, 2 x - 1], {0, Infinity}] // Defer //
HoldForm // DisplayForm // TraditionalForm
and
Sum[(-1)^n * FractionBox[StieltjesGamma[n], n!] *
Subscript[B, n + 1][-I c, 2 x - 1], {0, Infinity}] // Defer //
HoldForm // DisplayForm // TraditionalForm
FractionBox[π, 2] // MakeExpression // ReleaseHold
? However, what are you trying to achieve with these expressions? Just evaluatingπ/2
would achieve the same result. $\endgroup$DisplayForm
. If you useTraditionalForm
, orStandardForm
instead, it gets formatted as $\pi$. $\endgroup$