I would like Mathematica to symbolically line up partial derivative symbol with a value stored in variable. I wrote this simple code below
x = 2*z;
StringJoin["∂", x, "/∂y"]
I would like Mathematica to symbolically line up partial derivative symbol with a value stored in variable. I wrote this simple code below
x = 2*z;
StringJoin["∂", x, "/∂y"]
x = 2 z;
Well you might write
StringJoin["∂(", ToString@x, ")/∂y"]
"∂(2 z)/∂y"
which appears in an output cell as
but I think you should consider
Row[{"∂(", x, ")/∂y"}]
Row[{"∂(", 2 z, ")/∂y"}]
This appears in an output cell as
Even though its internal form is very different from the string returned by StringJoin, its output form is very similar. I like Row because it does a better job of spacing the 2 z term.
StringJoin["\[PartialD]", ToString@x, "/ \[PartialD]y"]– rotom407 Jun 03 '17 at 10:20