Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
SeanF74 SeanF74 is offline
external usenet poster
 
Posts: 6
Default Equation Numbers, inserting field

I have a list of equations in a word document that I need to add a reference
(the first equation in the document will be equation A, the second will be
equation B, etc. When I get to equation 27 it needs to be AA, then 28 will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the text
paragraphs to update if I add an equation to the middle of the document. I
know I should use a field code and cross reference it in the text to do this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Equation Numbers, inserting field

Use a caption to label the equations and a cross-reference to reference
them. Both Caption and Cross-reference are found in the Captions group on
the References tab in Word 2007. Captions use SEQ fields that may or may not
update automatically (SEQ fields don't ordinarily, but captions may have
some extra Word magic); REF fields don't update automatically. Both are
updated at print time, when you switch to Print Preview, or when you Ctrl+A,
F9 to update fields.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"SeanF74" wrote in message
...
I have a list of equations in a word document that I need to add a
reference
(the first equation in the document will be equation A, the second will be
equation B, etc. When I get to equation 27 it needs to be AA, then 28
will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the text
paragraphs to update if I add an equation to the middle of the document.
I
know I should use a field code and cross reference it in the text to do
this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Equation Numbers, inserting field

Use a caption to label the equations and a cross-reference to reference
them. Both Caption and Cross-reference are found in the Captions group on
the References tab in Word 2007. Captions use SEQ fields that may or may not
update automatically (SEQ fields don't ordinarily, but captions may have
some extra Word magic); REF fields don't update automatically. Both are
updated at print time, when you switch to Print Preview, or when you Ctrl+A,
F9 to update fields.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"SeanF74" wrote in message
...
I have a list of equations in a word document that I need to add a
reference
(the first equation in the document will be equation A, the second will be
equation B, etc. When I get to equation 27 it needs to be AA, then 28
will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the text
paragraphs to update if I add an equation to the middle of the document.
I
know I should use a field code and cross reference it in the text to do
this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Equation Numbers, inserting field

For the particular format requested you cannot use the Caption dialog box.
Instead, you will have to create the fields manually as explained at
http://homepage.swissonline.ch/cindy...Q.htm#XLTypeNr.

--
Stefan Blom
Microsoft Word MVP



"Suzanne S. Barnhill" wrote in message
...
Use a caption to label the equations and a cross-reference to reference
them. Both Caption and Cross-reference are found in the Captions group on
the References tab in Word 2007. Captions use SEQ fields that may or may
not update automatically (SEQ fields don't ordinarily, but captions may
have some extra Word magic); REF fields don't update automatically. Both
are updated at print time, when you switch to Print Preview, or when you
Ctrl+A, F9 to update fields.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"SeanF74" wrote in message
...
I have a list of equations in a word document that I need to add a
reference
(the first equation in the document will be equation A, the second will
be
equation B, etc. When I get to equation 27 it needs to be AA, then 28
will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the
text
paragraphs to update if I add an equation to the middle of the document.
I
know I should use a field code and cross reference it in the text to do
this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Equation Numbers, inserting field

For the particular format requested you cannot use the Caption dialog box.
Instead, you will have to create the fields manually as explained at
http://homepage.swissonline.ch/cindy...Q.htm#XLTypeNr.

--
Stefan Blom
Microsoft Word MVP



"Suzanne S. Barnhill" wrote in message
...
Use a caption to label the equations and a cross-reference to reference
them. Both Caption and Cross-reference are found in the Captions group on
the References tab in Word 2007. Captions use SEQ fields that may or may
not update automatically (SEQ fields don't ordinarily, but captions may
have some extra Word magic); REF fields don't update automatically. Both
are updated at print time, when you switch to Print Preview, or when you
Ctrl+A, F9 to update fields.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"SeanF74" wrote in message
...
I have a list of equations in a word document that I need to add a
reference
(the first equation in the document will be equation A, the second will
be
equation B, etc. When I get to equation 27 it needs to be AA, then 28
will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the
text
paragraphs to update if I add an equation to the middle of the document.
I
know I should use a field code and cross reference it in the text to do
this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,






  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Equation Numbers, inserting field


To get the numbering format you need /and/ the cross-referencing
capability, I believe you will need to
a. follow Suzanne's suggestion re. caption creation.
b. replace the standard { SEQ } field by something that will return
the correct sequence format (A,..,Z,AA,..,AZ, etc.

When you reference an "Equation" for example, Word relies on the fact
that you have used a SEQ sequence name "Equation", e.g.

{ SEQ Equation }

Unfortunately I don't believe any of the standard numbering formats you
can apply will do what you need. However, if you use the following
nested SEQ fields I think you will be OK for a 1- or 2-letter sequence.
I use the letter "i" to keep the field code as short as possible, so you
will either need to create a Caption label called "i", or modify the "i"
in these fields to be the caption label you want to use:

At the beginning of your document, you will need the following field:

{ SET f "ALPHABETIC" }

and optionally

{ SEQ i \r0 }

Then within each caption you will need

{ SEQ i \#"'{ =25-{ SEQ i c } \#"'';'{ =int({ SEQ i \c }/26) \*{ f } }'"
}{ =mod({ SEQ i \c },26)+1 \*{ f } }'" }


(You can get rid of most of the spaces in there if you prefer). There
may be a simpler formulation - I haven't tried to pare it down any further.

Each of the {} has to be the special "field brace pairs" that you can
insert using ctrl-F9.

Because that's quite a lot to insert, you're probably going to be better
off creating your entire caption text, including the nested fields, and
making an autotext/quick part out of it. I believe the resulting
captions can be referenced in the usual way, and that the
numbering/renumbering behaves properly when you insert/delete captions,
but you should check for yourself.

An option that requires a bit more preparation but has a simpler set of
field codes and is more easily extended to 3 or more letters is to
predefine a large number of Word Document Variables, which you can then
insert using DOCVARIABLE fields., e.g.

Use the following VBA to set up Document variables called x1, x2, x3,...

Sub CreateListNumbers()
Const s As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Dim c As String
Dim i As Integer
Dim k As Integer
k = 0
For i = 0 To 26
If i = 0 Then
c = ""
Else
c = Mid(s, i, 1)
End If
For j = 1 To 26
k = k + 1
ActiveDocument.Variables.Add Name:="x" + Trim(Str(k)), Value:=c &
Mid(s, j, 1)
Next j
Next i
End Sub

Then in your captions, use the following nested { SEQ } field:

{ SEQ i \#"'{ DOCVARIABLE "x{ SEQ i \c }' }'" }

In this case, it's a bit easier to use an existing Caption label, e.g.

{ SEQ Figure \#"'{ DOCVARIABLE "x{ SEQ Figure \c }' }'" }

If you use the VBA to generate the necessary Document Variables in a
Word template, each document based on the template will contain the
variables. So you don't need to run the VBA again, and you dont' need to
distribute it or ask anyone else to run it.

Peter Jamieson

http://tips.pjmsn.me.uk

On 15/01/2010 13:58, SeanF74 wrote:
I have a list of equations in a word document that I need to add a reference
(the first equation in the document will be equation A, the second will be
equation B, etc. When I get to equation 27 it needs to be AA, then 28 will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the text
paragraphs to update if I add an equation to the middle of the document. I
know I should use a field code and cross reference it in the text to do this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,

  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Equation Numbers, inserting field

Apologies if this turns up several times...

To get the numbering format you need /and/ the cross-referencing capability,
I believe you will need to
a. follow Suzanne's suggestion re. caption creation.
b. replace the standard { SEQ } field by something that will return the
correct sequence format (A,..,Z,AA,..,AZ, etc.

When you reference an "Equation" for example, Word relies on the fact that
you have used a SEQ sequence name "Equation", e.g.

{ SEQ Equation }

Unfortunately I don't believe any of the standard numbering formats you can
apply will do what you need. However, if you use the following nested SEQ
fields I think you will be OK for a 1- or 2-letter sequence. I use the
letter "i" to keep the field code as short as possible, so you will either
need to create a Caption label called "i", or modify the "i" in these fields
to be the caption label you want to use:

At the beginning of your document, you will need the following field:

{ SET f "ALPHABETIC" }

and optionally

{ SEQ i \r0 }

Then within each caption you will need

{ SEQ i \#"'{ =25-{ SEQ i c } \#"'';'{ =int({ SEQ i \c }/26) \*{
f } }'" }{ =mod({ SEQ i \c },26)+1 \*{ f } }'" }


(You can get rid of most of the spaces in there if you prefer). There may be
a simpler formulation - I haven't tried to pare it down any further.

Each of the {} has to be the special "field brace pairs" that you can insert
using ctrl-F9.

Because that's quite a lot to insert, you're probably going to be better off
creating your entire caption text, including the nested fields, and making
an autotext/quick part out of it. I believe the resulting captions can be
referenced in the usual way, and that the numbering/renumbering behaves
properly when you insert/delete captions, but you should check for yourself.

An option that requires a bit more preparation but has a simpler set of
field codes and is more easily extended to 3 or more letters is to predefine
a large number of Word Document Variables, which you can then insert using
DOCVARIABLE fields., e.g.

Use the following VBA to set up Document variables called x1, x2, x3,...

Sub CreateListNumbers()
Const s As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Dim c As String
Dim i As Integer
Dim k As Integer
k = 0
For i = 0 To 26
If i = 0 Then
c = ""
Else
c = Mid(s, i, 1)
End If
For j = 1 To 26
k = k + 1
ActiveDocument.Variables.Add Name:="x" + Trim(Str(k)), Value:=c & Mid(s,
j, 1)
Next j
Next i
End Sub

Then in your captions, use the following nested { SEQ } field:

{ SEQ i \#"'{ DOCVARIABLE "x{ SEQ i \c }' }'" }

In this case, it's a bit easier to use an existing Caption label, e.g.

{ SEQ Figure \#"'{ DOCVARIABLE "x{ SEQ Figure \c }' }'" }

If you use the VBA to generate the necessary Document Variables in a Word
template, each document based on the template will contain the variables. So
you don't need to run the VBA again, and you dont' need to distribute it or
ask anyone else to run it.


Peter Jamieson

http://tips.pjmsn.me.uk
"SeanF74" wrote in message
...
I have a list of equations in a word document that I need to add a
reference
(the first equation in the document will be equation A, the second will be
equation B, etc. When I get to equation 27 it needs to be AA, then 28
will
be AB...) next to. However, I will be adding other equations randomly
throughout the document and referring to the equation reference in text
paragraphs. I would like to have both the equation reference and the text
paragraphs to update if I add an equation to the middle of the document.
I
know I should use a field code and cross reference it in the text to do
this,
but I don't know which one I should use or how to insert it next to the
equation in Word 2007. Could anyone please help?

Thanks,


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a space in an equation? sleland Microsoft Word Help 1 February 19th 09 02:57 AM
inserting an equation in word 2007 SanD New Users 1 January 16th 09 09:23 PM
Inserting Text based of an Equation Result Expando1 Microsoft Word Help 1 August 22nd 08 07:47 PM
Inserting Equation Captions in MS word 2003 elbadry Microsoft Word Help 2 September 23rd 07 03:16 PM
Problem inserting Microsoft Equation Objects in Word 2003 david Microsoft Word Help 2 November 15th 06 12:36 AM


All times are GMT +1. The time now is 05:03 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"