Skip to main content

Tips to use with Google Docs

Numbering and referencing equations in Google Docs

Situation

You're writing a report and have several equations that must be referenced. There seems to be no way in Google Docs to add equation numbers to equations, and to reference them in the document such that the references are hyperlinked to the equation numbers.

Background

Ever since MathType 4.0 for Windows, released in April 1999, MathType has included a Word-only feature that lets you to easily insert numbered equations and references. This capability was introduced on the Mac in March 2004 with the release of MathType 5.0.

MathType for Google has been available since March 2018, but Google Docs does not provide the same developer framework as Microsoft Office, thus does not enable us to provide equation numbering and referencing in a way that's similar to doing so in Word.

It is, however, possible to do so manually.

小心

Note: To clarify, it is possible to create your own Google Docs add-on to add equation numbers and references, but the result is not similar to the experience in Word, and that's the point we were making above. You can do this with Google Apps Script, but we don't provide instructions for that nor do we provide support for it if you choose that route.

Positioning display equations

If you're not familiar with the term, a display equation is an equation in its own paragraph, usually centered between left and right margins. Sometimes display equations also have an equation number. The equation number is usually at the left or right margin.

When you're using Word, you can insert numbered display equations automatically by clicking the "Left-numbered" or "Right-numbered" command on the MathType tab in Word. When you do so, MathType applies a style to the paragraph. This style is called MTDisplayEquation. Part of what this style does is add 2 tab stops to the paragraph. It adds a center-justified tab midway between left and right margins, and it adds a right-justified tab at the right margin. The equation is centered with the center-justified tab, and equation numbers at the right margin are so positioned with the right-justified tab.

We'll use the same technique to add numbered display equations to Google Docs.

Adding tabs to the document

It's easiest if you do this when you first start a new document, but if you have an existing document you're working with, just select all its contents ( Ctrl+A on Windows or Command+A on Mac), then proceed as described below. Whatever the case, any new paragraphs you add should already have the tabs set.

  1. If the Ruler is not showing, select Show ruler in the View menu.

  2. Click the ruler at a point halfway between left & right margins. If you're using Letter sized paper in portrait mode and your margins are in inches and at the default settings, that will be at the 3¼" point. If you're using A4 paper in portrait mode with default margins in centimeters, it will be at the 8cm point. Wherever it is for your document, you'll see something like this:

    google_numbered_setting_tab.png

    Click Add center tab-stop, and you'll see a diamond at that point on the ruler.

  3. Repeat step 2 except insert a right tab-stop at the right margin.

提示

Tip: You'll probably not be able to click exactly at the right margin and get this menu for setting a tab. A good technique is to click a little to the left of the right margin, set the right tab-stop there, then click and drag it over to the right margin.

Inserting a numbered display equation

In the steps below, we'll insert a display equation with its equation number at the right margin. If you (or the style guide you're working under) prefer left-numbered equations, modify these steps to put the number there.

  1. Begin a new paragraph where you want the equation. Add an empty line above it if you want, but we won't.

  2. Press Tab to move the insertion point (cursor) to the midpoint of the line.

    google_numbered_cursor_center.png
  3. Insert the equation, press Tab , and type the equation number.

    google_numbered_equation_number.png
  4. Press Enter and continue the document.

Inserting an equation reference

We're ready to insert an equation reference, and we can do that by simply typing the equation number in the document's text. We want the reference to be "live" though, and want it to act as a hyperlink. These steps show how to do that, but there's no need to do this to every numbered equation. You can if you want, but we recommend just setting up links for the numbers you need to reference.

  1. We'll do this with bookmarks, so to begin, select the equation number and its associated label.

    google_numbered_equation_number_selected.png
  2. Choose Insert > Bookmark.

    google_numbered_bookmark_inserted.png
  3. At the point in the text where you want the reference, insert a link. A convenient way to do that is with the Ctrl+K shortcut ( Command+K Mac), but you can also click the google_insert_link.gif toolbar icon or choose the Link command from the Insert menu.

  4. Click Bookmarks, and a list of your bookmarks will appear.

    google_numbered_insert_link.png
  5. Choose the one you are referencing. There's no need to type anything into the Text box, because Google will add that for you. But Google will add more than you need. Even though you selected the equation label and number when you added the bookmark, Google considers the entire line to be bookmarked. Therefore you have 2 choices. One, you can type the equation label and number yourself in the space provided. Two, you can click to choose the bookmark, then in the Text box, delete the asterisk and tab. Either way, it should look like this:

    google_numbered_apply_equation_number.png
  6. Click Apply to complete adding the equation reference.