1
$\begingroup$

I am new to Mathematica, and I am using Mathematica v12.3. I am writing some math notes which include text and some equations. I know that in a text cell I can press CTRL+( and start typing some equations and they would appear in mathematical notation. But sometimes if an equation is highlighted and I accidentally press CTRL+(, the equation is converted to some kind of markup code. For example x^2+9-50 would become \!( *SuperscriptBox[(x), (2)] + 9 - 50)

The strange thing is that most of the time this action cannot be undone with CTRL+Z, and the undo is greyed out in the Edit tab. I have to close the file and reopen it to get it to the state it was last saved.

enter image description here

I want to know what is this markup code, and how I can undo this action, and why it does what it does, why only on highlighted text?

$\endgroup$
7
  • 1
    $\begingroup$ Its not an answer, but undo is also bugged in v14. Commenting out via keyboard shortczt and undoing doesnt undo the comment, and in the worst case deleted part of the code without reversibility. $\endgroup$ Commented Sep 10 at 6:12
  • 1
    $\begingroup$ Welcome to Mathematica StackExchange! If you want to know more about the syntax you are seeing, I suggest reading String Representation of Boxes. I have also edited your question and included a screen record of the behaviour you are observing. I hope this is what you meant. $\endgroup$
    – Domen
    Commented Sep 10 at 9:34
  • $\begingroup$ The thing you described happens often. It is a feature, rather than a bug. To transform the formula back do the following: 1) select the transformed expression 2) go to Menu/Evaluation/Evaluate in Place. Done. However, if the formula is short I often retype it. Have fun! $\endgroup$ Commented Sep 10 at 9:38
  • $\begingroup$ @AlexeiBoulbitch The Evaluate in Place works only with some equations, not every. also it does not convert them back into what they were before, for example it converts into x^2 instead of original $x^2$ - but the main issue is that why this can not be undo. and what is the purpose of this function. $\endgroup$
    – Asim
    Commented Sep 10 at 13:53
  • $\begingroup$ @Asim Please see the answer. $\endgroup$ Commented Sep 10 at 16:32

1 Answer 1

0
$\begingroup$

Please see the result of the application of the Evaluate in Place to the in-line math cell

enter image description here

If in some cases it does not work wrap the math expression by the TraditionalForm like the following:

TraditionalForm[x^2]

and apply the Evaluate in Place afterwards.

Concerning your main issue, I do not know.

Have fun!

$\endgroup$
1
  • $\begingroup$ this does not help, Yes evaluate in place works with normal short equations but not a complex one.it is not about wrapping the text in TraditionalForm, its about why if accidentally highlighter text get a CTRL+( command can not be undone in usual way. I have tried many different ways to reverse it but every time i do something it make worst and that also can not undo. I just can't understand the purpose of this behavior. $\endgroup$
    – Asim
    Commented Sep 11 at 19:15

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.