Skip to main content
deleted 32 characters in body
Source Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k

Here is an approach using CellEvaluationFunction:

Use the Options Inspector and set CellEvaluationFunction to:

(Map[ToExpression, Row[Apply[Riffle[#, RowBox[{"\", \""}]]&\""]& , #]]]& ) 

This is best combined with style sheets to define a style that automatically uses this function. (Ask if you need help setting this up.)

To use this more simply, or simply to try it out, evaluate this to create a new Input cell, then type your input into that cell:

CellPrint[ Cell[BoxData[""], "Input", CellEvaluationFunction -> (Map[ToExpression,    (ToExpression /@ Row[Apply[Riffle[#Row[Riffle[#, RowBox[{"\", \""}]]\""] &, #]]]@@ #] &)]] 

The result should look like this:

Mathematica graphics

Here is an approach using CellEvaluationFunction:

Use the Options Inspector and set CellEvaluationFunction to:

(Map[ToExpression, Row[Apply[Riffle[#, RowBox[{"\", \""}]]& , #]]]& ) 

This is best combined with style sheets to define a style that automatically uses this function. (Ask if you need help setting this up.)

To use this more simply, or simply to try it out, evaluate this to create a new Input cell, then type your input into that cell:

CellPrint[ Cell[BoxData[""], "Input", CellEvaluationFunction -> (Map[ToExpression,    Row[Apply[Riffle[#, RowBox[{"\", \""}]] &, #]]] &)]] 

The result should look like this:

Mathematica graphics

Here is an approach using CellEvaluationFunction:

Use the Options Inspector and set CellEvaluationFunction to:

(Map[ToExpression, Row[Apply[Riffle[#, "\", \""]& , #]]]& ) 

This is best combined with style sheets to define a style that automatically uses this function. (Ask if you need help setting this up.)

To use this more simply, or simply to try it out, evaluate this to create a new Input cell, then type your input into that cell:

CellPrint[ Cell[BoxData[""], "Input", CellEvaluationFunction -> (ToExpression /@ Row[Riffle[#, "\", \""] & @@ #] &)]] 

The result should look like this:

Mathematica graphics

Source Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k

Here is an approach using CellEvaluationFunction:

Use the Options Inspector and set CellEvaluationFunction to:

(Map[ToExpression, Row[Apply[Riffle[#, RowBox[{"\", \""}]]& , #]]]& ) 

This is best combined with style sheets to define a style that automatically uses this function. (Ask if you need help setting this up.)

To use this more simply, or simply to try it out, evaluate this to create a new Input cell, then type your input into that cell:

CellPrint[ Cell[BoxData[""], "Input", CellEvaluationFunction -> (Map[ToExpression, Row[Apply[Riffle[#, RowBox[{"\", \""}]] &, #]]] &)]] 

The result should look like this:

Mathematica graphics