2
$\begingroup$

I have an "advanced" question about InputAutoReplacements. I have been working on creating InputAutoReplacements to make my workflow faster. The InputAliases's are frustrating having to reach up over the keyboard to press escape before and after my input. I find InputAutoReplacements much more intuitive and faster.

You can add my InputAutoReplacement for a limit using the following code. Go ahead and try it if you would like. However, it will overwrite any old InputAutoReplacements you have. So make sure to save your old ones if you have any and reinstall after. (Or you can replace the word "$FrontEnd" with "$FrontEndSession" below resulting in my InputAutoReplacement only staying active for the current session. Your old ones will not be lost. They will reinstall once you restart Mathematica. )

    SetOptions[$FrontEnd,
 InputAutoReplacements -> {"slimit" -> 
    FormBox[RowBox[{UnderscriptBox["lim", 
        RowBox[{"\[SelectionPlaceholder]", "\[Rule]", 
          "\[Placeholder]"}]], "\[Placeholder]"}], TraditionalForm]}]

With this InputAutoReplacement loaded my workflows as follows.

  1. Start typing in a text cell.
  2. Press control+9 to create an InlineCell
  3. Type in the characters "slimit", then space and then tab through to enter appropriate values for the placeholders
  4. Then control+) to move out of the InlineCell

This works great, however, I would like to cut down on my keystrokes. I would like to eliminate steps 2 and 4. I would like to type in "slimit" and the result will be that Mathematica opens an inline cell automatically, uses the InputAutoReplacement, then moves out of the inline cell automatically.

Is this possible?

The rest of the following is background info... on why I need what I need. No need to read if you are not interested. I know I can create keybindings to change 2 and 4 to something easier then control + 9 and control + ), but I would like to make this even easier by eliminating steps 2 and 4 altogether.

If you are wondering why I need an the InputAutoReplacement to be inside an inline cell while inside a text cell, it is because of the limitations mathematica has on moving around placeholders in any text cell. If I was working in an input cell there is not problem and do not need an inline cell. Hence no need for steps 2 and 4. However, in a text cell it is needed to move through placeholder with the tab key without having to press the left arrow key twice first.

I confirmed this with Wolfram technical support. They do not support tabbing through placeholders without pressing the left arrow key twice to move back into the Inline Cell. They suggested I create a palette. This takes too long and defeats the purpose of what I'm doing. :/ In addition, the selection placeholder does not autoselect even if I do press the left arrow key twice.

I am attached a gif illustrating working in a text cell. Notice in the first example after I create an Inline Cell and enter the InputAutoReplacement, I have to press the left arrow key twice to move back into the Inline Cell then I can tab through the placeholders. But even then... the selection placeholder is not autoselected.

The second example where I use an Inline Cell works perfecty... the tabbing works. And the selection placeholder works too! However, I am looking for an even shorter method to this by eliminating steps 2 and 4 above.

enter image description here

Let me know what you think. Thank you! Also, I have created 130 AutoInputReplacements specifically for writing Calculus textbook material. I can send you the file if anyone is interested.

Mike

$\endgroup$

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.