PDF download Download Article
Two simple ways to add a line over text and equations in Word
PDF download Download Article

So you know how to underline just about anything in Word, but what if you need to over line something? This is a fairly common occurrence in statistics and other scientific fields, but Word doesn't exactly make it easy. There are a couple different ways you can do it using either field codes or the equation tool; see Step 1 below to learn how.

Overlining with Field Codes

  1. Press Ctrl+F9 (Windows) or Cmd+F9 (Mac) to insert field code brackets.
  2. Type "EQ \x \to()" between the field code brackets.
  3. Type the text you want overlined between the parentheses in the above formula.
  4. Press Shift+F9 with your cursor still between the brackets to apply the field code.
Method 1
Method 1 of 2:

Using Field Codes

PDF download Download Article
  1. Field codes can be finicky, and have been known to crash Word. Save your file before proceeding so that you have a version to go back to if things don't go right. You can also create a copy as an extra layer of protection.
  2. Press Ctrl + F9 in Windows or Command + F9 on a Mac to create the field code brackets {}. The brackets will be highlighted with a gray color. In order to over line the text you want, you'll need to create a specialized field code. You will not be able to select text and apply the effect; instead, you will be typing the test you want over lined into the field code function itself.
    • Field codes will work on all versions of Word, for both Windows and Mac.
    Advertisement
  3. Type the following in between the brackets: EQ \x \to() . There is a space between "EQ" and "\x", as well as a space between "\x" and "to()". Make sure not to include any extra spaces, or the function will not work.
    • If you copy the formula from this article and paste it into your document, Word will most likely add spaces at each end, which will cause the field code to not work. Type it out yourself for best results.
  4. Place your cursor between the parentheses in the field code. Type the text you want, including any spaces. Your function should look like this: {EQ \x \to(your text goes here)} . Keep your cursor in the field code when you are finished.
  5. Once you are finished entering your code and text, you can convert the field code into the finished product. With your cursor inside the field code, press Shift + F9. This will convert the code, displaying the text you entered in the parentheses with a line over it.
    • Using the overline effect will most likely skew your line spacing, so be sure to review your whole document to see if anything was affected.
  6. Field codes are powerful scripting tools, and can cause problems if not used correctly. If the formula was entered incorrectly in any way, the code may disappear, or your program may even crash. Make sure that you aren't inserting extra spaces or characters, and that the formula is typed exactly as seen above.
    • If your code disappears, press Shift + F9 to toggle it back to the code view. You can then review your code and make any necessary changes. [1]
  7. Advertisement
Method 2
Method 2 of 2:

Using the Equation Function

PDF download Download Article
  1. You can use the Equation Editor to apply the mathematical overline accent to your text. The overline effect produced is slightly different than the field code function. You cannot select your text and then apply the equation, you will have to enter the text after creating the equation.
    • To insert an equation, click the Insert tab. Click the Equation button in the Symbols section. If you are using Word 2003 or XP, click Insert → Object → Microsoft Equation 3.0.
  2. Before typing your text, add the accent. Click the Accents button in your Design section. There are actually to slightly different options you can pick from if you want an overline over your test. You can choose either the Bar, located in the Accents section, or the Overbar, located in the Over bars and Under bars section. Choose one and a small dotted box will appear in your formula field.
  3. Click the small dotted box and begin entering your test. You will see the overline effect applied immediately as you type. When you are finished, click outside of the formula field.
  4. If you can't get the overline to appear, chances are you didn't have the small dotted box selected when you entered your text. You must select it in order to type with the overline effect. Any text outside of the box will not be affected. [2]
  5. Advertisement


Expert Q&A

Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      About This Article

      Thanks to all authors for creating a page that has been read 500,074 times.

      Is this article up to date?

      Advertisement