How to insert an equation into a Word 2010 document inline via an escape sequence?

1

1

I would like to be able to insert an equation into a word 2010 document without having to Click Insert -> Equation from the ribbon. As an example:

the equation of a line is:
\eq(y=mx+b)
where m is the slope and b is the y-intercept. (and so on)

where \eq is my made up escape sequence. Is there such an escape sequence to get the equation caption? or am I out of luck? Google has not proved useful so far.

jlipstate

Posted 2014-07-24T15:31:54.757

Reputation: 11

Does it have to be an escape sequence because you are running some parsing code over your document or could you just a shortcut key to get equations to insert? [ALT] + [=] enters you into Equation Mode and will also make a selection into an equation. – Iraedei – 2014-07-24T15:51:28.043

I was hoping an escape existed as it seemed like a quick way to both type it out without having to do clicking, and later on using it to programmatically pass a string from c# that turns into an equation. I have looked at the conventional method for adding an equation programmatically, and this seemed like a too good to be true idea. :x – jlipstate – 2014-07-24T16:24:04.850

Answers

0

You could write some VB script that could scan over an entire document for these escape sequences, yes. I couldn't tell you the exact implementation though. However, I would suggest using opener and closers instead of an escape sequence as it may be easier to tell when the equation begins and when the equation ends. some equation here

Iraedei

Posted 2014-07-24T15:31:54.757

Reputation: 497

0

Solution A

ALT + =

Solution B

Use AutoCorrect Options:

  • insert an empty equation
  • mark it
  • go to "File -> Options -> Proofing -> AutoCorrect Options ..."
  • In the section "Replace text as you type" you will find your marked empty equation filled into the "With" field (do not modify it!)
  • you insert your escape sequence into "replace", click "Add" and "OK"

See https://cybertext.wordpress.com/2010/03/08/word-2007-setting-up-seq-fields-for-numbering-pt-1/ for a pictured tutorial (in the middle of the article).

daniel.neumann

Posted 2014-07-24T15:31:54.757

Reputation: 558