I want to typeset Gielis's superformula using the DisplayFormula
cell style. The result should look like $$\rho = R \left(\varphi \right) \left[ \left| \frac{1}{a} \cos \left( \frac{m}{4} \varphi\right)\right| ^{p_2} + \left| \frac{1}{b} \sin \left( \frac{m}{4} \varphi \right) \right| ^{p_3} \right] ^{{-}\frac{1}{p_1}}$$
If I don't write $p_2$ and $p_3$, the result is quite fine, as
\[Rho]=R (\[CurlyPhi])[|1/a cos(m/4 \[CurlyPhi])|+|1/b sin(m/4 \[CurlyPhi])|]^(-(1/Subscript[p, 1]))
However, if I try to add $p_2$ and $p_3$ to this formula, the result is quite confusing, as the |
becomes smaller for I don't know what reason:
\[Rho]=R (\[CurlyPhi])[|1/a cos(m/4 \[CurlyPhi])(|^Subscript[p, 2])+|1/b sin(m/4 \[CurlyPhi])(|^Subscript[p, 3])]^(-(1/Subscript[p, 1]))
I see that a simple pipe |
is not what I need to typeset an expression like mine. Which character is the correct one to use in this case?
|
is the infix form ofAternatives
, so yours is barely correct syntax. UseAbs
for the absolute value, backets[
and]
for function arguments andCos
andSin
for the cosine and sine function, repectively. Then you can applyTeXForm
and use the external package MaTeX to convert to nice formulas for display. $\endgroup$