Find and replace text inside equations in word 2013

Solution 1:

There is, but with limitations, and it's clumsy.

  1. Change all your equations to "Linear" (instead of "Professional").
    • For example, select all, go to the Equation tab, and click "Linear" on the left side.
    • Caution: Professional->Linear->Professional doesn't necessarily leave your equations unchanged. I have noticed that MathML imports from MathJax-node often change when I round-trip this way. Test your equations before you do a bulk conversion, or make backup copies!
  2. Within one of your Linear-mode equations, select the text you want to find (v^ for $\hat v$ in linear mode).
  3. Hit Alt+F11 to get to the VBA editor
  4. Hit Ctl+G to get to the Immediate pane
  5. Type/paste in this line and hit Enter:

    Selection.Find.Text=Selection.Text
    

    This copies the exact text you have selected in the equation into the "Find what" field of the Find dialog. A normal copy/paste won't work because you will get the normal text equivalents of the equation characters. Selecting text outside of an equation also won't work, for the same reason.

  6. Close the VBA editor and go back to Word.
  7. Hit Ctl+F. You will see that the "Find" box is filled in with the equation symbols, e.g., v^. As long as you don't change that text, you can hit Find Next to go to the next equation that (1) contains exactly that text and (2) is in Linear mode. It doesn't work for me if the equations are built up ("Professional") mode.
  8. When done searching, change your equations back to Professional mode.

A reason Find doesn't work in equations like it does in body text is that the symbols in new-style equations are not the same as the corresponding symbols outside of equations. See Unicode Tech Note (UTN) #28 for the exact symbols and Unicode codepoints used for operators, and Charbase's list for the codepoints used for script characters.