Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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 enter image description here 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.

share|improve this question
    
You mean you want template boxes to appear after typing Esc pd ESC without pressing CTRL-_ ? This would also mean that you need a special key to extend the number of boxes for each differentiation variable, if needed, right? What exactly do you mean by MakeBoxes trick? –  Jens Apr 14 at 15:49
    
@Jens I hoped that there are special Box Language operators for the sign of integral, and that of the curved d (partial differential), just like there is one for Sqrt, the SqrtBox. My search revealed no of such. I use the Box language in rather complex constructs, where more simple methods work unsatisfactorily, while the Box Language works fine. There is a possibility to use the MakeBoxes operator, wrapping it around a usual expression. This I know how to do. I wanted to learn how to make the construct without this. You can see from my answer below that I found a workaround. –  Alexei Boulbitch Apr 17 at 8:55

1 Answer 1

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

share|improve this answer
    
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 at 4: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 at 12:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.