Microsoft equation editor syntax

Elliot picture Elliot · Jun 4, 2010 · Viewed 11.7k times · Source

Does anyone know where to find the syntax specification for entering equations into the 2007/2010 equation editors using only the keyboard? Searching just gives many links to people talking about how great the editor is, not instructions on how to use it. I have seen this shown in multiple demos of the product, but there are no documentation for it anywhere, even in the MS help.

Answer

Andreas Rejbrand picture Andreas Rejbrand · Jun 4, 2010

Formula input is very natural. Here are a few general rules:

  • "a^b" is automatically transformed to ab. If your exponential contains several terms, write "a^(b + c)" which will be transformed to ab + c. If you really do want a(b + c), write "a^((b + c))".

  • The same things apply to subscript: \epsilon_0, e.g.

  • The same things apply to fractions, e.g. 1/(a+b) will be transformed to what you expect.

  • To insert "a sin x", make sure to insert the space between "a" and "sin". Otherwise the "sin" function will not be recognized, and thus it will be in italic (which is incorrect).

  • Special characters are inserted using the \chr syntax. Try e.g. \alpha, \Delta, \cdot, \oplus, etc.

  • In addition, you can try differently styled characters: \scriptD, \scriptO, \doubleR, \frakturR, etc.

  • To modify a character, try v\bar, f\hat, x\dot, x\ddot, etc.

  • To write a n-ary sum, simply write "\sum_(k=1)^\infty" followed be a space to automatically get the sum symbol with "k=1" below and the infinity sign above. This also works with \prod, \int, \oint, \bigotimes, etc.

  • To write a square root, write \sqrt followed by a space, or a paranthesized expression.

  • Brackets of different kinds are automatically regocnized. For instance, you can write "[a, b]" and get a true bracket. You can also try \bra \phi_1 | \phi_2 \ket etc.

  • You can also write 'strange' brackets like [0, 1[ (which is how Swedes write [0, 1)), with only little more effort: [0, 1\right[ and a space.

  • To toggle bold/italic on/off, use Ctrl+B/Ctrl+I (this is Microsoft Word, remember? :) ) But you might want to check the formatting of your most recently added formulae every time you open a document, because sometimes the formatting (bold/italic) you changed during your last 'session' is lost or changed when you open the document again. Reapplying the formatting usually makes it 'stick'. However, it seems impossible to format formulae correctly in headings and figure captions; the default style of these objects (usually bold) cannot be 'overruled' manually on a character-by-character basis inside a formula.

  • To insert a 3×3 matrix, write \matrix(@@&&) followed by a space. To get the parantheses, write (\matrix(@@&&)) and a space. You can also enter the elements directly (guess how!), but it is often easier to do that after the matrix has been created.

  • You might find Shift+Return useful in some cases where you want to align formulae. Also, you have probably already realised that (x+4)^2 >= 0, \forall x\in\doubleR looks very good on its own row if you put two spaces after the comma!

  • To enter plain text in a formula, write the text inside double quotation marks: For instance, a =\above("by the lemma") 0. Hint: You can create very nice double arrows (implication or equivalence) by adding a lot of spaces above them. This I recommend a lot. But be cautious: using literal spaces inside formulae often results in seemingly random loss of characters next to the spaces due to a bug (at least in Word 2007 and 2010).

Finally, do not forget the context (right-click) menu. This is highly context sensitive, and has a lot of convenient commands (remove accent, add lower/upper limit, remove exponent, add argument, remove brackets, etc.). If you have a menu key on your keyboard, this will come in very handy (you should also learn the letter that activates each menu item).

For more details, see my article on Microsoft Word (the sections about mathematics), or -- if you are really hardcore -- the specification of the 'linear format' used to enter formulae in Word.