0
$\begingroup$

Writing:

DialogInput[DialogNotebook[ {TextCell["(" <> ToString[Subscript["m", "2"], StandardForm] <> ")"], InputField[Dynamic[x], String], DefaultButton[DialogReturn[x]]}]] 

I get:

enter image description here

and I do not understand how to correct the code.

$\endgroup$
1
  • 2
    $\begingroup$ ExpressionCell[..., ShowStringCharacters -> False] $\endgroup$ Commented Mar 8, 2018 at 9:31

1 Answer 1

2
$\begingroup$

I would avoid linear syntax (strings generated using ToString[.., StandardForm]) and just use normal expressions. For example:

DialogInput[ DialogNotebook[ { Row[{"(", Subscript[m, 2], ")"}], InputField[Dynamic[x],String], DefaultButton[DialogReturn[x]] } ], ShowStringCharacters->False ] 
$\endgroup$
0