Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When I'm authoring in text style (Alt-7), I'll often include inline math. Whenever I enter two or more consecutive letters (e.g., $ax^2$), Mathematica will automatically "romanize" (or "un-italicize") the letters (e.g., ax$^2$). Is there any built-in way to prevent Mathematica from doing this? (I'm sure there's probably a programmatic way, but I'm not experienced in that). Thank you

share|improve this question
    
Italicizing single letters is a special behavior (controlled by SingleLetterItalics). Do you want everything in the inline cell italicized? –  Mr.Wizard Jan 14 at 15:48
    
@Mr.Wizard No, not at all. For example, if I enter the general quadratic equation $ax^2+bx+c=0$, I don't want the exponent italicized, nor the plus signs, nor the equal sign, nor the 0. Basically, I'd want it the way it's conventionally typeset (like for example the way Latex does it!) –  yroc Jan 14 at 15:54
1  
The key point, it seems to me, is that the option is for single letter italics. So, rather than writing ax, you just write a x like you ordinarily would in Mathematica, except that you can use a very thin space (\[VeryThinSpace]) or a zero-width one (\[InvisibleSpace]). You can of course also italicize text explicitly, either using the keyboard shortcut or by editing the cell expression. –  Oleksandr R. Jan 14 at 16:14
3  
It's not a lot of extra typing to use an invisible space. Just type ESC space ESC. –  Szabolcs Jan 14 at 17:00
1  
@yroc $\TeX$ assumes that individual characters typed consecutively without spaces are separate unless explicitly grouped, whereas Mathematica assumes they are grouped unless explicitly separated. Neither is wrong; they are just different. I don't agree that Mathematica "isn't built to properly format math", unless you consider any departure at all from what $\TeX$ does to be somehow improper. Maybe you want to try the MultiLetterItalics option, anyway. –  Oleksandr R. Jan 14 at 19:06
show 12 more comments

1 Answer 1

Enter an invisible space between a and x using the shortcut Esc+is+Esc, or a very thin space using Esc+Space+Esc.

Invisible space: Mathematica graphics

Very thin space: Mathematica graphics

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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