Skip to main content

evaluation - Apply a style to a selected structure


If I type out, in my notes, a series of transformations, I often like to convert the very last step to a Framed equation:


enter image description here


I'm currently doing this by:




  1. selecting the last expression,

  2. copying it,

  3. pasting it in a new field,

  4. adding Framed[ … ] and evaluating,

  5. copying the result,

  6. pasting it back in the original field.


Is there a hotkey or quick way for me to apply a transformation to a selection, replacing it with the result? (Or something like that.)


Thanks!




Answer




Ctrl+Shift+Enter is the keyboard shortcut for "evaluate in place", which you press after highlighting an expression; this should ease your task. – J. M.♦ 2 mins ago



enter image description here


Notice I used Defer, it holds its arguments and is stripped when boxes are created. Exactly what we need keep e.g. 1 + 1 in this form.


Related:


How can I change mouse hover behavior for hyperlinks in a notebook?


Comments