Numbering and Cross-Referencing Equations

advertisement
Numbering and Cross Referencing Equations
By Robert P. Hesketh Updated 3/13/03
For help in using the equation editor one reference is given at the waterloo site:
http://www.ist.uwaterloo.ca/ec/equations/equation.html
At the end of this section I will show you how to create a macro to automatically number the
equations using a macro button.
I use the equation editor and put in this equation on the line below. To get the spacing and
formatting I use the Format Tabs command and create a tab at 3.25 inches that is centered and a
tab at 6.5 inches that is right. This is shown in Figure 1
Figure 1: Formatting tabs
xy
(1)
The above equation is number 1. How did I put this equation number in the above equation? If
you use MS word’s equation number feature (under Insert Captions) you will not be able to cross
reference the equation. Try it and you will see the problems! So you must use the sequence
function. To do this choose Insert Field Numbering and then Seq. Then give a name to the
sequence such as eqn. See Figure 2 for clarification.
Figure 2: Equation Number using the field code seq
Now I would like to refer to the above equation using an equation number. I want this to be
done automatically so that I don’t have to renumber the equations after your team mate edits the
document.
You need to create a bookmark for the equation you want to use. To do this highlight only the
equation number in the text. Then go to Insert Bookmark and give the equation a name. I have
called equation 1 “xy”. To use the bookmark to refer to the above equation use the commands
Insert Cross-reference and choose Bookmark under Reference type:. Then choose the bookmark
you want to use.
Figure 3: Using Bookmarks
Now word will automatically number and cross reference your equations.
The equation above is equation The above line. What I really want is to have this equation
numbered so I use the handy-dandy Microsoft feature to number the equation as below (Insert
Caption Equation)
Below is a few examples of other equations.
x2  y 2
(2)
Notice that I only had to type eqn in the
form and then add the parenthesis
around the equation number. So the
above equation is equation 2. I can also
refer to equation 1 several times. A trick
will be to give the equation a bookmark
that you can remember. If you forget
then just go to the bookmark. Use the
Edit, Go To command and choose
bookmark.
Figure 4: Finding a bookmark
Creating a Macro to automatically Number Equations
To create a macro you need to repeat the steps above with the macro creation turned on. First
create an equation.
dP

= - 0 0
dV

Then place your cursor at the right hand side of the equation and start the macro: Tools, Macro,
Record New Macro
And Assign macro to the Toolbars. Drag the
Normal.NewMacros.Equation to the tool bar for
future use.
Then do the following:
1. Format Tabs: centered tab at 3.25 and a right tab at 6.5 in.
2. Press the Home key to move to the left margin
3. Type a tab
4. Press the End key and type another tab
5. Type a parenthesis
6. Insert Field Code Numbering, then type eqn as the name of the sequence
7. Finally add the closing parenthesis
8. Stop recording the macro.
dP

= - 0 0
dV

(3)
9. Now you want to edit your button: Normal.NewMacros.Equation because it is ugly and
too long! Right click on the macro button and choose customize.
10. Now right click again on the Normal.NewMacros.Equation button and choose change
button image. I use the 8 ball macro.
11. Next chose default style under the options. Now you should have a toolbar with an eight
ball in it for automatic number of equations!
Equation
Macro
Button
Now test your new macro!
n
n
dHN
  H i 0 Fi 0   H i Fi Q  W s
dt
i 1
i 1
(4)
Wow it works!
The next step is to attach this to your normal document so that you can use it on any computer!!!
Go to help for that!
Referencing Figures:
The Insert Caption Figure command only has one bug! If you have text wrap around your
figures, then it will not pick it up in the cross referencing. So you must convert the text box to a
frame and remove the line.
Here is the procedure for referencing figures.
Select the figure.
Choose Insert Caption
Type the title of the figure at this time or later
Select the text box
See the sequence of figures given below:
Then choose Convert to Frame…, shown in
Figure 5, and answer OK to the next screen
shown in Figure 6.
Figure 6: Warning?
To remove the line click on the frame border
and use the Format, Borders and Shading
Figure 5: Formatting the text box
command which is shown in Figure 7.
Figure 7: Removing the lines from the frame
To reference the figure, (and all figures in the text are required to be referenced in the text)
choose the Insert Cross-reference and choose Figure under Reference type: as shown in Figure 8.
Figure 8: Cross-referencing a Figure
Download