# Easy way to enter conventional forms of limit expression?

(1) I want to insert into a Text cell conventional in-line mathematical notation like $\lim_{x\to a} f(x)$.

I know I can do it by typing the StandardForm Limit[f[x], x -> a] in an Input cell, convert to Traditional Form via a Cell menu item, then paste the result into the Text cell. Or, per comment by @Bob Hanlon, type it into the text cell, select it, and use Evaluation menu item "Evaluate in place".

Is there some quicker way to do that, by means of a keyboard sequence or palette?

[I looked at the Classroom Assistant palette, but there seems to be no button to enter a limit expression other than in StandardForm (which is a bit strange, given the buttons in that palette for entering traditional forms for sums, products, derivatives, and integrals).]

(2) What about the conventional display mathematical notation like $$\lim_{x\to a} f(x)$$ where the $x \to a$ is below the $\lim$ part?

Is there some reasonably easy way to get that?

• You can at least do Limit[f[x], x -> a] // TraditionalForm, but as for pasting into a Text cell, I don't know. Commented Sep 8, 2015 at 4:11
• After entering the expression Limit[f[x], x -> a] // TraditionalForm in the text cell, select the expression and from the Evaluation menu select Evaluate in Place Commented Sep 8, 2015 at 5:14
• Using TraditionalForm like that works OK -- but only for an "in-line" limit layout, that is, with the $x\to a$ in subscript position to the right of $\lim$. How can I get $x\to a$ to appear *below" $\lim$, as in a proper display-math layout -- the way I showed in my original question? Commented Sep 8, 2015 at 14:04
• I usually do it the "shortcut" way: in a Text Cell, press Ctrl + 9, enter lim, press Ctrl + 4, enter a->0, press , enter sin(a). Commented Sep 9, 2015 at 13:38
• Entering a -> 0 or such as a subscript, with shortcut key Ctrl+4, only allows the "in-line" layout for limits, but not the proper "display" layout for limits in a display. Commented Sep 10, 2015 at 0:33

My approach is to use the Option Inspector (menu command Format > OptionInspector) to set the option for the relevant cells

UnderscriptBoxOptions -> {LimitsPositioning -> False}


If I'm doing this a lot, I might create a new style that inherits from "Text", or change "Text" itself (e.g., via a private stylesheet).

Or one can create a template of sorts, for copy-pasting, with the following:

CellPrint@Cell[TextData[{

Cell[BoxData[
FormBox[
StyleBox[
RowBox[{
UnderscriptBox["lim",
RowBox[{"\[Placeholder]", "\[Rule]", "\[Placeholder]"}]],
" ",
"\[Placeholder]"}],
UnderscriptBoxOptions -> {LimitsPositioning -> False}],
]],

" "}], "Text"]


One could also create one's own palette with a button to paste one's own commonly used text constructions.

You could change the "InlineCell" style definition. For example:

SetOptions[
EvaluationNotebook[],
StyleDefinitions -> Notebook[
{
Cell[StyleData[StyleDefinitions->"Default.nb"]],
Cell[StyleData["InlineCell"], ScriptLevel->0, FontFamily->"Times"]
},
StyleDefinitions->"PrivateStylesheetFormatting.nb"
]
]


Now, when creating an inline cell in a text cell, the above "InlineCell" options will be used. In the "InlineCell", you can either:

1. Enter the FullForm of an expression and then use the Cell | Convert To | TraditionalForm menu item, or the equivalent keyboard shortcut (Shift + Cmd + T in OSX) to transform the cell into TraditionalForm

2. Enter the desired output using the usual keyboard short cuts.

Here is an animation showing both approaches: