1

I'm going to make a palette for partial differential and total differential.

PasteButton[ Style["\!\(\*SubscriptBox[\(∂\),
 \(\[SelectionPlaceholder]\)]\)\[Placeholder]", 16], 
Unevaluated@D[\[SelectionPlaceholder], \[Placeholder]],ImageSize -> {65, 35}]

When the button was pressed, the partial differential symbol was well created.

enter image description here

PasteButton[ Style["\!\(\*SubscriptBox[\(\[DifferentialD]\), 
\(\\[SelectionPlaceholder]\)]\)\[Placeholder]", 16],  
Unevaluated@Dt[\[SelectionPlaceholder], \[Placeholder]], ImageSize -> {65, 35}]

But this time, if you press the button, it's not an expression. It comes out in the form of Inputform.

enter image description here

Can I print it out to maintain the form of the equation? I'm going to put the value in the form of the output equation and run it to get the calculated value.

xzczd
  • 65,995
  • 9
  • 163
  • 468
Milk
  • 1,688
  • 10
  • 9
  • 1
    …Interesting, I didn't know \[DifferentialD] can be used in this manner, and this doesn't seem to be documented, how do you notice this feature? – xzczd Dec 27 '23 at 07:36

1 Answers1

1

My solution for your previous question still works:

PasteButton[Style["\!\(\*SubscriptBox[\(\[DifferentialD]\), 
\(\\[SelectionPlaceholder]\)]\)\[Placeholder]", 16], 
 RowBox[{SubscriptBox["\[DifferentialD]", "\[SelectionPlaceholder]"], 
    "\[Placeholder]"}] // DisplayForm, ImageSize -> {65, 35}]

BTW,the RowBox[{SubscriptBox["\[DifferentialD]", "\[SelectionPlaceholder]"], "\[Placeholder]"}] is found by

  1. Select the expression.

  2. Right click, copy as -> cell expression.

  3. Paste. (If pasted in notebook, select "No" in popup menu. )

Here's a GIF showing the process:

enter image description here

xzczd
  • 65,995
  • 9
  • 163
  • 468