1

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

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

enter image description here

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

xzczd
  • 65,995
  • 9
  • 163
  • 468
Milk
  • 1,688
  • 10
  • 9

1 Answers1

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?

xzczd
  • 65,995
  • 9
  • 163
  • 468