I want to make a pallet button that keeps the form of the formula intact.

PasteButton["\!\(\*RadicalBox[\(\[SelectionPlaceholder]\), \(\\[Placeholder]\)]\)", \
RadicalBox["\[SelectionPlaceholder]", "\[Placeholder]"],

enter image description here

However, the button above is expressed in a different form. How should I modify it?


1 Answer 1

PasteButton["\!\(\*RadicalBox[\(\[SelectionPlaceholder]\), \(\\[Placeholder]\)]\)", 
 RadicalBox["\[SelectionPlaceholder]", "\[Placeholder]"] // DisplayForm]

is a possible work-around. To understand why it works, you may want to read the following:

Schrödinger's MatrixForm: feature or bug?

  • $\begingroup$ Thank you. I solved it well. $\endgroup$
    – Milk
    Dec 9, 2023 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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