I am looking for the name of the box in the Box Language of Mma making integrals, such as those shown in the image below
as well as of the sign of the partial derivative. I understand that I can get it through MakeBoxes trick, but it would be nicer to have special operator for such a purpose. The code with such an operator will be more concise.
Asked
Active
Viewed 189 times
2
Alexei Boulbitch
- 39,397
- 2
- 47
- 96
1 Answers
3
It seems that there are no special boxes for these symbols. One can, however, use standard operators of the box language and insert there symbols from the palette Menu/Palettes/Special Characters/Symbols such as integral or partial derivativederivative. Like this one finds:
StyleBox[RowBox[{"\[Integral]", "y", "(", "x", ")",
"\[DoubleStruckD]", "x"}], Italic] // DisplayForm
yielding
(* \!\(
TagBox[
StyleBox[
RowBox[{"\[Integral]", "y", "(", "x", ")", "\[DoubleStruckD]", "x"}],
FontSlant->Italic],
DisplayForm]\) *)
Otherwise, one can do this:
StyleBox[RowBox[{"\[Integral]", "y(x)", "\[DoubleStruckD]x"}],
Italic] // DisplayForm
with the same effect. This, for instance,
StyleBox[FractionBox["\[PartialD]y(x)", "\[PartialD]x"],
Italic] // DisplayForm
returns a partial derivative
Alexei Boulbitch
- 39,397
- 2
- 47
- 96
-
One problem with these constructs is that they contain merely formatting and cannot be re-used as input if you copy them from the output cell. I thought you may be looking more for something along the lines of this, where I made sure the interpretation of the formatted output is preserved. But I guess you're happy with the solution you found... there isn't anything really simpler I can think of. – Jens Apr 18 '14 at 04:26
-
@Jens Yes, Jens, my question has been related to a quite special case. Within a CDF paper I have buttons that open new windows with formulas. The buttons then work as references to the formulas. So I needed a sure enough way to put a formula inside a button. Problems arise sometimes, if it is opened on a machine with Mathematica. Then the formula that will open may interfere with variables Mathematica may know at that moment. The Box Language offers a sure way to avoid such a confusion. – Alexei Boulbitch Apr 22 '14 at 12:15
MakeBoxestrick? – Jens Apr 14 '14 at 15:49