1
$\begingroup$

I quit my Mathematica notebook session mid-computation. When I reopen it, the mathematical expression disappeared leaving something like

Cell[BoxData[

 RowBox[{

  RowBox[{"f", "[", "t_", "]"}], ":=", " ", 

  RowBox[{

   RowBox[{

    RowBox[{

     RowBox[{"(", 

      RowBox[{"t", "-", "t1"}], ")"}], "/", 

     RowBox[{"(", 

      RowBox[{"t2", "-", "t1"}], ")"}]}], 

Is there any way to salvage the original expression from this script-like thing?

$\endgroup$
3
  • $\begingroup$ I have sometimes successfully recovered corrupt notebooks using AuthorTools using the approach described here. $\endgroup$ – Tim Laska Jul 8 '20 at 1:52
  • $\begingroup$ @TimLaska: Thank you. It does not seem to succeed. It is OK. $\endgroup$ – Hans Jul 8 '20 at 2:19
  • $\begingroup$ If they are not cut like in your example you can use MakeExpression to get an expression or RawBoxes / NotebookWriteto just make a valid cell. Here's an example: RawBoxes@RowBox[{RowBox[{"f", "[", "t_", "]"}], ":=", " ", RowBox[{RowBox[{RowBox[{RowBox[{"(", RowBox[{"t", "-", "t1"}], ")"}], "/", RowBox[{"(", RowBox[{"t2", "-", "t1"}], ")"}]}]}]}]}] but I added missing brackets. $\endgroup$ – Kuba Jul 8 '20 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.