7
$\begingroup$

I'm trying to do some typesetting in which I mix text with formulas. The Mathematica documentation has a section titled "Mixing Text and Formulas" which pretty much describes what it is that I'd like to do. However I can't seem to work out how they do it.

The tutorial says to use Ctrl+( to start entering a formula within text or vice versa, however I don't seem to get the result I am after.

This is what their example looks like: enter image description here

Notice that they have been able to mix text with a formula that is in TraditionalForm, this is what I would like to be able to do.

If I enter: "Hello World = " x^2 but Ctrl+( before I enter the x^2....

Hello World = x^2

Further Clarification

Some further clarification (I would have preferred to enter this clarification after all of your helpful hints below but the guidelines recommend against answering your own question or adding further clarification in that way):

In my text box I'd like to use a prior defined equation rather than having to re-enter and format it in the text box. Hopefully this next image will clarify:

enter image description here

$\endgroup$
5
  • $\begingroup$ Can you post what you are getting? $\endgroup$ Commented Sep 28, 2013 at 16:07
  • $\begingroup$ Press ALT-7 to create a new text cell, then you can type some text and use CTRL-( to start adding math format. Does that get you closer to what you want? $\endgroup$ Commented Sep 28, 2013 at 16:35
  • $\begingroup$ @episanty et.al., Thanks for your suggestions however I've added a further clarification to explain a bit more about what I'm trying to achieve. $\endgroup$ Commented Sep 30, 2013 at 1:37
  • $\begingroup$ This works for me: Alt+7, This is some text Ctrl-9 x RightArrow. On my keyboard layout Ctrl-9 creates an inline cell where I can type traditional form formulae. Pressing the right arrow key on the keyboard exists this inline cell. On non-English keyboard layouts the shortcut might be different. Go to Insert -> Typesetting and check what keyboard shortcut is listed next to "Start Inline Cell", or just use the menu item. $\endgroup$
    – Szabolcs
    Commented Jul 31, 2015 at 13:47
  • $\begingroup$ And this is a 2 yr old question. I didn't realize that. $\endgroup$
    – Szabolcs
    Commented Jul 31, 2015 at 13:47

3 Answers 3

7
$\begingroup$

You need to be in a text cell to begin with. Starting on a cell division (so your cursor is horizontal instead of vertical), press Alt+7 to create a text cell. There you can type text and it will get interpreted as such. If you then want to input maths, type Ctrl+( and it will create a math box. You can also create a math box by, e.g. creating a superscript using Ctrl+^.

$\endgroup$
3
$\begingroup$

Thanks for your help guy's, I have found a solution that fulfils my requirements.

enter image description here

$\endgroup$
2
$\begingroup$

Use a palette from the menu when typing x^2 or use Ctrl+^ to get a superscript box.

It will be like this:

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.