Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 09-17-2018, 05:00 AM
antros48 antros48 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2018
Posts: 6
antros48 is on a distinguished road
Default Equations Numbering

Hi all,
I need to number my equations on my thesis and that is a lot of work. I tried using the native word feature with Styleref Seq Equation, but this does not give me the possibility to number subsections as well (e.g. equation 1.1.2).


I have been trying to find a source code to assign a macro for doing that, but i did not find something similar..
Can anyone help me in this task?

Thank you in advance
Reply With Quote
  #2  
Old 09-17-2018, 05:20 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,199
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Your description suggests you should be using Word's captioning function (References|Caption>Label:Equation) and, if you use first & second-tier multilevel list numbers for the chapter & section, specifying the second-tier Style for 'Chapter starts with Style' option in the aforementioned dialogue, that will give you a chapter, section, & label combination.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 09-17-2018, 06:30 AM
antros48 antros48 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2018
Posts: 6
antros48 is on a distinguished road
Default

Thank you for the response,
When i use the caption preference, the field properties asks me to choose the appropriate heading level. If i select heading 1 then all equations are changing numbering based on this selection...
Reply With Quote
  #4  
Old 09-17-2018, 12:57 PM
slaycock slaycock is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Sep 2013
Posts: 255
slaycock is on a distinguished road
Default

Macropod's recommendation should work if you are using the built in heading styles.

The alternative is to use a combination of a styleref field and the equation numbering field. Use the \s switch in the equation numbering field to restart numbering at the relevant heading level.

{styleref "myHeadingstyle2" \s} -{seq equation \s 2}


In Section

3.2 <Title in heading style 2>

<equation 1> {styleref "Heading 2" \s} -{seq equation \s 2}

<equation 2> {styleref "Heading 2" \s} -{seq equation \s 2}

<equation 2> {styleref "Heading 2" \s} -{seq equation \s 2}

Should give you

<equation 1> 3.2-1

<equation 2> 3.2-2

<equation 2> 3.2-3

The \s switch isn't documented and I found it by accident. It appears to insert the chapter number without any preceding text
Reply With Quote
  #5  
Old 09-17-2018, 01:44 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,199
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by antros48 View Post
Thank you for the response,
When i use the caption preference, the field properties asks me to choose the appropriate heading level. If i select heading 1 then all equations are changing numbering based on this selection...
And, if you choose Heading 2, or 3, or 4, the caption will use that. If that Style incorporates multi-level numbering, the caption will incorporate the numbering appropriate to that Style.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #6  
Old 09-17-2018, 10:31 PM
antros48 antros48 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2018
Posts: 6
antros48 is on a distinguished road
Default

Thank you for the responses. I will give it a try and see the results.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Styling equations kiltro Word 1 08-30-2018 03:57 PM
Figures and equations numbering antros48 Word 7 07-30-2018 02:37 PM
Equations won't print dave76845 Word 0 07-24-2013 01:26 AM
Using Equations sunnylim007 PowerPoint 4 08-30-2012 07:58 AM
Numbering equations Yonnif Word 1 12-01-2010 03:37 AM


All times are GMT -7. The time now is 11:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft