5
$\begingroup$

After a bad saving, I had problems with my Mathematica notebook. I have expressions in this form:

Cell[BoxData[
   RowBox[{
      RowBox[{"\[CapitalOmega]", 
         SuperscriptBox[
           RowBox[{"(", 
              RowBox[{"B\[Beta]", "|", "B\[Alpha]"}], ")"}], 
       "B\[Beta]"]}], "=", 
      RowBox[{"{", 
         RowBox[{"0", ",", 
            RowBox[{"D", "[", 
               RowBox[{
                  RowBox[{"\[Beta]", "[", "t", "]"}], ",", "t"}], 
          "]"}], ",", "0"}], 
         "}"}]}]], "Input",
  CellChangeTimes -> {{3.6538827264790764`*^9, 3.653882730240291*^9}, {
       3.653882768458477*^9, 
    3.653882777822013*^9}, {3.653883018977806*^9, 
       3.653883022469006*^9}, 
   3.653890453286024*^9, {3.6539033468457146`*^9, 
       3.653903357854344*^9}, {3.6539035195335913`*^9, 
    3.653903541642856*^9}, 
      3.653903623781554*^9}]

How can I retrieve normal looking Mathematica input from this kind of code?

$\endgroup$

2 Answers 2

5
$\begingroup$

Works ok like this, without the cell change times. I didn't change anything else.

Paste it into a notebook and choose 'interpret', or don't and prefix it with CellPrint to see the code.

Cell[BoxData[RowBox[{RowBox[{"\[CapitalOmega]",
      SuperscriptBox[RowBox[{"(",
         RowBox[{"B\[Beta]", "|", "B\[Alpha]"}], ")"}], 
       "B\[Beta]"]}], "=", RowBox[{"{", RowBox[
       {"0", ",", RowBox[{"D", "[",
          RowBox[{RowBox[{"\[Beta]", "[", "t", "]"}],
            ",", "t"}], "]"}],
        ",", "0"}], "}"}]}]], "Input"]
$\endgroup$
2
  • $\begingroup$ Thank you perfect ! I manage with CellPrint. However, i didn't find 'interpret'. May you precise me its location ? Thank you $\endgroup$
    – Bendesarts
    Oct 20, 2015 at 20:52
  • $\begingroup$ The option to interpret the text appears automatically when I paste it into a notebook. $\endgroup$ Oct 20, 2015 at 21:19
2
$\begingroup$

Another way to do it is:

  1. start a new input cell in your notebook by typing any character
  2. select the cell by clicking on the cell bracket on the right-had side
  3. choose Show Expression from the Cell menu
  4. select the text of the now visible cell expression and paste your cell expression to replace it.
  5. repeat steps 2 and 3

Show Expression has the shortcut Cmnd+Shift+E on OS X. I think it's Ctrl+Shift+E on Windows. Don't know what it is on other operating systems.

$\endgroup$
2
  • $\begingroup$ After step 4 you need to uncheck Show Expression. $\endgroup$ Oct 20, 2015 at 22:12
  • $\begingroup$ @JackLaVigne. Repeating step 3 will accomplish that. $\endgroup$
    – m_goldberg
    Oct 20, 2015 at 22:43

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.