How can I write this equation in a nice manner when posting on Mathematica.SE?
Cos[Subscript[\[Beta], 0][t]] Sin[Subscript[\[Alpha], 0][t]] ==
Cos[Subscript[\[Beta], i][t]] Sin[Subscript[\[Alpha], i][t]]
How can I write this equation in a nice manner when posting on Mathematica.SE?
Cos[Subscript[\[Beta], 0][t]] Sin[Subscript[\[Alpha], 0][t]] ==
Cos[Subscript[\[Beta], i][t]] Sin[Subscript[\[Alpha], i][t]]
Try this:
expr = Cos[Subscript[\[Beta], 0][t]] Sin[Subscript[\[Alpha], 0][t]] ==
Cos[Subscript[\[Beta], i][t]] Sin[Subscript[\[Alpha], i][t]]
expr /. Subscript[a_, b_] -> a[b]
(* Out: Cos[\[Beta][0][t]] Sin[\[Alpha][0][t]] == Cos[\[Beta][i][t]] Sin[\[Alpha][i][t]]*)
You can then use http://steampiano.net/msc/ to get:
Cos[β[0][t]] Sin[α[0][t]] == Cos[β[i][t]] Sin[α[i][t]]
Subscript[b, Sequence @@ {a, u}] /. Subscript[a_, b_] -> a[b]
Feb 24, 2016 at 20:42
Subscript[a_, b_, c_] -> a[b, c]
? There won't be any perfect solution; the unfortunate truth is that a lot of hand-conversion may be needed.
The short answer is that there is no easy way to do what you ask. The editor we use on Mathematica.SE website does not support entry and display of two-dimensional forms nor does it convert Mathematica's special character notation to Unicode.
Some amelioration is possible, depending on your intent for posting the code.
For special characters that have Unicode equivalents, install halirutan's plug-in into your web browser (see Additional useful buttons for our M.SE editor) and use the αβ button that it adds to our editor to make the conversion.
If the snippet you are pasting in represents Mathematica output, then you can insert a PNG image of the output into your post rather than pasting in text.
If the snippet you are pasting represents input to Mathematica, then you might post the expression both as text and as a PNG image of the input. Do not post a PNG image without a text version.
As others have already mentioned there are good, solid, technical reasons for avoiding the use of Subscript
expressions in Input cells (cells that get evaluated). I, myself, never use them in Input cells. Pretty formatting does not compensate sufficiently for the problems Subscript
expressions can cause in evaluations.
Subscript
s in your calculation. Not only does it improve readability, it also protects you from sneaky unintended behavior.{}
button above the edit window. The edit window help button?
is also useful for learning how to format your questions and answers. You may also find this this meta Q&A helpfulSubscript
while defining symbols (variables).Subscript[x, 1]
is not a symbol, but a compound expression whereSubscript
is an operator without built-in meaning. You expect to do $x_1=2$ but you are actually doingSet[Subscript[x, 1], 2]
which is to assign a Downvalue to the opratorSubscript
and not an Ownvalue to an indexedx
as you may intend. Read how to properly define indexed variables here