I'm using Mathematica for some calculations that I need to put into the report. As a text editor I'm using MS Word + MathType, but that is not the main case. The thing is that I have to format my calculations like this:
Let R = 3. Then, the volume of the sphere is $$ V=\frac{4\pi R^3}{3} = \frac{4\pi \cdot 3^3}{3} = 113.1$$
This is just an example, but it shows what I need: the output that Mathematica provides has to be not only as a number, but as a copyable textline with the new variable (V in this case) at the beginning, then the equal mark, then the formula as text, equal mark, formula with numbers, equal mark again, and finally the result. And I also need to manipulate the roundoff of the result (say, like the Round[]
function does).
The way, how I'd want to have it in Mathematica is a function like N[]
, when it goes like this:
In[1]:= 2Pi//N
Out[1]:= 6.28319
Or, to be specific:
In[1]:= R=3;
In[2]:= V=(4 Pi*R^3)/3 //FriendlyOutput
Out[2]:=
Here comes the expression shown above
I have tried to create such function, but I came up only with two variants:
1) In[1]:= Print[HoldForm[(4 Pi*R^3)/3], HoldForm["="], Round[(4 Pi*R^3)/3, 0.01]]
2) In[1]:= {HoldForm[(4 Pi*R^3)/3], "=", Round[(4 Pi*R^3)/3, 0.01]}
But as you can see they are way far from what I want, they're not functions that I could apply directly to the expression, and, not to mention, when I copy the output as a MathML, LaTeX or directly into Word by pressing Ctrl+C, it's full of unnecessary garbage (I would show it, but there's a limit on the amount of links).
Is there any way to make it convenient and ready-to-copy as I mentioned at the beginning?