# How to input formula embedded in text

I'm creating a styled notebook showing a simple theorem. I can set cell style as text or theorem or code to satisfy my requirement. But when I explain the theorem, I need to embed formula (not necessary for a whole line) into text. How can I do that. I didn't find any style for that.

• @Nasser I didn't know that Ctrl+9 is sufficient because the doc says otherwise and I use this rarely. Btw, you can close an inline cell by pressing Ctrl+0. Jan 5 '14 at 3:17

Pretty easy: This is called an Inline Cell and you can start one with Ctrl+(. For the inline cell you can specify whatever style you like.

## Edit

It seems Ctrl+9 is sufficient to start a new inline cell. The official shortcut listing says that you should type a (, therefore, I assumed that you need the Shift too.

• Thx. It seems "Shift" is not neccessary. Jan 5 '14 at 3:10
• @zhangwfjh Yes, I have noticed this too (now). I have updated my answer and I included a link to the official shortcut keys. Jan 5 '14 at 3:14
• Quite useful. Thanks again. Jan 5 '14 at 3:20
• @zhangwfjh TraditionalForm is my choice for inline formulas. But I don't think you can impose it via CTRL+) because it is not a style and needs evaluation. What I do is usually keep a separate list of inline formulas all in TraditionalForm. Then you can just copy-paste them inside your text as they are. Jan 5 '14 at 13:20
• It never even occurred to me that shift+9 and ( are the same keys until now. Oct 2 '16 at 12:35

I would like to expand a bit the answer of Vitaly Kaurov in the comments to the answer of halirutan. I type inline formulas usually as it is described in the halirutan answer. However, sometimes, though, rarely it does not work, and I need to apply the way Vitaly described. Then it may be done as follows:

1. In the text cell type your text. For instance "some text".
2. Make Ctrl+9 to start the inline math cell
3. Type the expression that should further be visualized as a formula. Assume we want there to be an indefinite integral of Exp[-x]. Then type