Some recommendations for organizing auto-numbering when writing scientific articles and dissertations using Microsoft Word
- And the chest just opened.
I.A. Krylov
What this article is about
In this paper, we describe how to automatically organize numbered objects when writing articles, abstracts, reports, dissertations, etc. When writing this kind of material, it is inevitable that one or another object will be numbered, for example, formulas or paragraphs in the list of used literature. However, many authors use when writing a text editor Microsoft Word.
In the case of a trivial “manual” organization, in which each number is written directly by hand (usually, at the very end, when the text is completely ready), the author of the work may be mistaken in any number, and all further numbers will be incorrect. Moreover, after the review, certain parts of the work can be inserted into the text or removed from it. The latter often requires a complete renumbering of the objects in the document. Thus, the purpose of this article is to convey to the reader how to automatically organize the numbering of objects to avoid the above situations.
Warning: This article includes only those tricks that the author encountered when writing a dissertation. The described methods for organizing numbered objects do not claim uniqueness, completeness, and optimality. There are other interesting ways, for example, in TeX . Undoubtedly, the reader will be able to find other ways to achieve the stated goal. In any case, any interested reader should be familiar with the author's approaches (at least at his leisure).
MS Word Field Basics
This section describes the main fields of the MS Word text editor necessary for organizing lists and links to them, as well as methods for working with them.
The MS Word field is an object that takes one or another value depending on the keywords and parameters of this field. To insert a field into the text, press the key combination Ctrl + F9 or select the corresponding menu on the ribbon.
After inserting the field, gray curly brackets appear in the text.
It is very easy to distinguish fields in the text - just select the desired block of text. All fields in the selected fragment will be highlighted in gray.
After the field is inserted into the text, you must set the value of this field. To set a value for this or that field, it is necessary to write certain keywords, discussed in section 2, inside the field. After setting the value to the field, select the block of text containing this field and press F9. If there are several fields in the selected fragment, then all of them will be updated. To update the fields in the entire document, select everything (Ctrl + a) and press F9. You can also update the field by clicking on the corresponding item in the context menu.
NB! It happens that all fields need to be updated twice: the first update will reorder the lists, and the second will arrange the necessary link values.
The value of a field can be changed at any time. To do this, you just need to select a field (or a text fragment containing fields) and select the "Codes / field values" item in the context menu.
The main MS Word fields necessary for the automatic organization of numbered objects
This section describes the main fields and keys used with these fields. These fields allow you to organize automatic numbering, lists and links.
To organize automatic numbering, you must use the following fields:
Seq
The SEQ field is used to create numbered lists. Each SEQ field increments by one the unique variable specified in this field. If such a variable has never been used, then its value becomes equal to 1. If you insert a field with this variable into one or another part of the text and completely update the document, then the numbering of all fields coming after the inserted one will automatically increase by one.
Example of setting the SEQ field
{SEQ pic_chap1}
NB! It is advisable to use meaningful variable names, for example: pic_chap1 - figures of the first chapter, fn_intro - formulas in the introduction, etc. Authors can use any variable names, but it is the meaningful names that will allow you to quickly navigate in the text and correct it.
Important keys for the SEQ field. The key "\ c" is used to display the current value of the variable. In particular, using the tab (SET) with the value of the field with the key "\ c", you can organize the automatic output of the number of tables, figures, formulas and other objects, which will be shown below. The key "\ h" increases the value of the variable in the place where the field is specified, without displaying the field itself. Using the keys "\ h" and "\ c" together is obviously acceptable, but does not make sense. The author recommends to refrain from this.
SEQ Field Key Usage Examples
{SEQ pic \ h}, {SEQ tables \ c}
SET
The SET field sets a bookmark at a given location in the document.
SET field example
{SET lit_Z2009 “1”}
Here lit_Z2009 is the name of the bookmark, and “1” is the text of the bookmark. The most significant is the ability to use nested fields, i.e. fields inside the fields. In particular, they can be used as bookmark text. To do this, insert the field as described above, while inside the field.
Example
{SET lit_Z2009 “{SEQ lit \ c}”}
Ref
The REF field is used to create bookmark links and hyperlinks. If the bookmark was defined somewhere in the text, then you can refer to it, for example, like this:
Example
After updating this field, the bookmark text will be inserted in its place. The key "\ h" is used to set the hyperlink to the bookmark. By clicking on the hyperlink, the user will be moved to the location specified by the link. The key "\ * MERGEFORMAT" resets the text format of the source link, converting it to the format of the current part of the text.{REF lit_Z2009}
PAGEREF
The PAGEREF field works in the same way as the REF field, except that the link text is the page number on which the corresponding object is located, and not the number of the object.
Organization of automatic numbering in documents
Before you start describing how to automatically number objects in documents, you need to warn the reader about the obvious minus of the proposed approach: for each type of object and for each element of lists with links you will have to create your own unique identifier. In this case, the author recommends that you think through the system of unique names in advance and write it down somewhere so that it is always in front of your eyes. A huge plus will be the fact that during transfers, inserts, adding and deleting objects and links, all objects are guaranteed to have the correct numbers, and links are guaranteed to point to the necessary objects.
Numbering in the titles of chapters and sections
To name chapters and sections, you can use MS Word styles, and then insert auto-title. However, if the second chapter suddenly becomes the third or section 2.2 becomes section 2.3, then renumbering a large number of formulas, tables and figures will be a troublesome task. Particular difficulties will cause the renumbering of the list of literature, organized in order of appearance. To avoid the above, it is recommended that each chapter be given a unique name (probably based on its meaning). In addition, for chapters, you must define a unique variable — the name of the SEQ field. For example, the name of this chapter may be CHAP_USING_FIELDS , and the variable counter of chapters may be CHAP .
After determining how to name and number the chapters, the following (one of the following) line is written in the heading:
- {SEQ CHAP} . Organization of automatic numbering in documents
- {SEQ CHAP \ h} {SET CHAP_USING_FIELDS “{SEQ CHAP \ c}”} {SEQ CHAP \ c} . Organization of automatic numbering in documents
Let us examine these lines in more detail. The first line causes the value of the CHAP variable to increase by one. After updating the field, the current chapter number will appear in its place. This numbering method is suitable for objects that are not planned to be referenced in the text (for example, for intermediate formulas). If reference to the object is required, then the second construction must be used. In it, the first field increases the value of the CHAP variable without displaying it, the second field sets a bookmark with the name CHAP_USING_FIELDS , giving it the text of the third field - the current value (already increased by 1) of the CHAP variable , and the fourth field displays the current value (already increased in this place) on 1) variable CHAP. It should be noted that the third field is nested in the second field. Such a construction is used because there is no clear understanding of which field will be updated earlier and in which case - nested or coming after, if only one of them had the "\ c" key. Experience has shown that increasing a variable in the background and using the current value leads to the desired result. On this reception all further reasoning is built.
To number the sections within the chapter, you need to set a variable (unique for each chapter, otherwise the sections in the next chapter will start with the number n + 1), and for each section you need to define a unique name.
The following lines are an example.
{SEQ CHAP \ h} {SET CHAP_USING_FIELDS “{SEQ CHAP \ c}”} {SEQ CHAP \ c} . Organization of automatic numbering in documents
{SEQ SUBCHAP_FIELDS \ h} {SET SUBCHAP_USING_REF “{SEQ CHAP \ c}. {SEQ SUBCHAP_FIELDS \ c}”} {SEQ CHAP \ c}. {SEQ SUBCHAP_FIELDS \ c} . Using REF
After updating links, this piece of text will turn into
3 . Organization of automatic numbering in documents
3.1 . Using REF
{SEQ SUBCHAP_FIELDS \ h} {SET SUBCHAP_USING_REF “{SEQ CHAP \ c}. {SEQ SUBCHAP_FIELDS \ c}”} {SEQ CHAP \ c}. {SEQ SUBCHAP_FIELDS \ c} . Using REF
After updating links, this piece of text will turn into
3 . Organization of automatic numbering in documents
3.1 . Using REF
In this example, the second technique is used, described in the chapter numbering, only now two fields are nested and go after. The first field {SEQ SUBCHAP_FIELDS \ h} in the background updates the corresponding variable defined in the sections of this chapter, fields 2-4 {SET SUBCHAP_USING_REF “{SEQ CHAP \ c}. {SEQ SUBCHAP_FIELDS \ c}”} sets the link with the value “CURRENT CHAPTER CURRENT SECTION ", and fields 5-6 {SEQ CHAP \ c}. {SEQ SUBCHAP_FIELDS \ c} insert the value" CURRENT CHAPTER CURRENT SECTION "in this place of the document.
It should be repeated once again that for each chapter and section (sub-chapter, paragraph), it is necessary to define your own unique names for specifying references to them, if necessary.
Auto content
MS Word tools allow you to organize auto-content, but it is recommended to use the REF fields to specify links to chapter numbers and the PAGEREF fields for page links. It is better to arrange them in tables with hidden borders of size N x3, where N is the number of elements in the auto content: sections, subsections, etc. The first column will contain the numbers of items obtained from the REF fields . The second column will contain the names of the elements. (Alas, ah! They will have to be written down by hand). The third column will contain the page numbers on which the corresponding SET field is located . Retrieving values is done through PAGEREF .
Numbering formulas
For numbering formulas, you need to use the same constructions as for numbering chapters and subsections. The author recommends placing formulas in tables N x2, where N is the number of formulas that follow in a row, hiding the borders of the tables and exposing the desired alignment.
An example is shown here.
x = a + b (3.5)
Here (3.5) is the value of the field, which is written in the source code as follows:
( {SEQ FN_CHAP_FIELDS \ h} {SET FN_AX2_BX_C “{SEQ CHAP \ c}. {SEQ FN_CHAP_FIELDS \ c}” } {SEQ CHAP \ c}. {SEQ FN_CHAP_FIELDS \ c} )
Here FN_CHAP_FIELDS is the name of the variable for numbering the formulas of the current chapter, {SEQ CHAP \ c}. {SEQ FN_CHAP_FIELDS \ c} is the number of the corresponding formula.
Here (3.5) is the value of the field, which is written in the source code as follows:
( {SEQ FN_CHAP_FIELDS \ h} {SET FN_AX2_BX_C “{SEQ CHAP \ c}. {SEQ FN_CHAP_FIELDS \ c}” } {SEQ CHAP \ c}. {SEQ FN_CHAP_FIELDS \ c} )
Here FN_CHAP_FIELDS is the name of the variable for numbering the formulas of the current chapter, {SEQ CHAP \ c}. {SEQ FN_CHAP_FIELDS \ c} is the number of the corresponding formula.
NB! When converting a document to pdf, formulas are often displayed incorrectly. In the final version of the dissertation, the author replaced all formulas with the corresponding drawings through the good old PrintScreen - MS Paint.
Numbering tables and figures
The numbering of tables and figures is done in the same way as the numbering of formulas. The only difference is that it is better for the corresponding objects to give different names and think up other counter variables for them, for example, PIC_CHAP2 , TABLE_BETTER_NPV , etc.
Here are a couple of examples.
Example 1, tables
Table {SEQ TAB_CH2 \ h} {SET TAB_CH2_SHOPS “{SEQ CHAP \ c}. {SEQ TAB_CH2 \ c}”} {SEQ CHAP \ c}. {SEQ TAB_CH2 \ c} . Comparison of warehouse / market for shopping.
Shop 1 Shop 2
Warehouse 100 180
Market 16 29
Here TAB_CH2 is the counter variable of the tables of the second chapter, TAB_CH2_SHOPS is the name chosen by the author for this table. Let this chapter number 3, and it already had 3 tables. Then this formula, as it is easy to show, will be transformed into the following text:
Table 3.4 . Comparison of warehouse / market for shopping.
Shop 1 Shop 2
Warehouse 100 180
Market 16 29
Shop 1 Shop 2
Warehouse 100 180
Market 16 29
Here TAB_CH2 is the counter variable of the tables of the second chapter, TAB_CH2_SHOPS is the name chosen by the author for this table. Let this chapter number 3, and it already had 3 tables. Then this formula, as it is easy to show, will be transformed into the following text:
Table 3.4 . Comparison of warehouse / market for shopping.
Shop 1 Shop 2
Warehouse 100 180
Market 16 29
The work with images is constructed in exactly the same way. You need to set your counter variables, names, etc. In general, from the point of view of auto-numbering, there is no difference between the table and the figure. All the difference lies only in the formatting of parts of the text: other names, signatures below / above, etc.
Example 2, images
Figure {SEQ PIC_CH2 \ h} {SET PIC_CH2_EXPONENT “{SEQ CHAP \ c}. {SEQ PIC_CH2 \ c}”} {SEQ CHAP \ c}. {SEQ PIC_CH2 \ c} . Exponent, cosine and sine.
Similar to the tables, here PIC_CH2 is the counter variable for the drawings in the second chapter. Again, it is obvious that the result will be something like this:
Figure 3.10 . Exponent, cosine and sine.
Similar to the tables, here PIC_CH2 is the counter variable for the drawings in the second chapter. Again, it is obvious that the result will be something like this:
Figure 3.10 . Exponent, cosine and sine.
Organization of the list of used literature
Working with a list of references is generally similar to working with formulas, tables, and figures, but still has one significant difference. Because of this, the organization of the list of references was put out in a separate section. This section describes in detail the construction of a list of used literature in alphabetical order. The construction of the list of references in the order of appearance in the text is not described in such detail, but can easily be done by analogy.
Making the list of used literature in alphabetical order at the end of the document
So, in the text there was a need to make a link to a book, article, magazine, etc. If they should go as a single list, the design should be done in a row in alphabetical order. If they must follow the types of sources, then first you need to write books alphabetically, then articles alphabetically, etc. In the sense of auto-numbering, this does not matter. Only the order in which these sources will be recorded is important, after which they will be assigned numbers.
NB! Each source must be given a unique name that will be used to specify links in the text. When writing a dissertation, the author used the format " lit_INITIALS_AUTORS_YEAR " or " lit_INITIALS_AUTORS_POSTFIX_YEAR". Postfix is needed in order to separate those or other works that the author (s) could release in one year. Keep this list of unique names before your eyes, as you have to turn to him often .
When adding new sources, you just need to insert them in the right place in the list of used literature, keeping order, and double-refresh the document. An update is twice required to update nested fields and external fields. Double updating of the document guarantees both updating the list of references and updating links to it.
An example of a part of a list with expanded formulas is shown below.
{SEQ LIT \ h} {SET lit_CHR2011 “{SEQ LIT \ c}”} {SEQ LIT \ c} . Christofides N. Graph Theory: An Algorithmic Approach. Academic Press Inc., London, 1975 .-- 400 p.
{SEQ LIT \ h} {SET lit_CHVATAL1983 “{SEQ LIT \ c}”} {SEQ LIT \ c} . Chvatal V. Linear Programming. WH Freeman and Company, 1983.- 425 p.
{SEQ LIT \ h} {SET lit_ERL1978 “{SEQ LIT \ c}”} {SEQ LIT \ c} . Erlenkotter D. A Dual-Based Procedure for Uncapacitated Facility Location. J. Operations Research, 26, 1978. - pp. 992-1009.
It is easy to show that this list is converted to
15 . Christofides N. Graph Theory: An Algorithmic Approach. Academic Press Inc., London, 1975 .-- 400 p.
16. Chvatal V. Linear Programming. WH Freeman and Company, 1983.- 425 p.
17 . Erlenkotter D. A Dual-Based Procedure for Uncapacitated Facility Location. J. Operations Research, 26, 1978. - pp. 992-1009.
{SEQ LIT \ h} {SET lit_CHVATAL1983 “{SEQ LIT \ c}”} {SEQ LIT \ c} . Chvatal V. Linear Programming. WH Freeman and Company, 1983.- 425 p.
{SEQ LIT \ h} {SET lit_ERL1978 “{SEQ LIT \ c}”} {SEQ LIT \ c} . Erlenkotter D. A Dual-Based Procedure for Uncapacitated Facility Location. J. Operations Research, 26, 1978. - pp. 992-1009.
It is easy to show that this list is converted to
15 . Christofides N. Graph Theory: An Algorithmic Approach. Academic Press Inc., London, 1975 .-- 400 p.
16. Chvatal V. Linear Programming. WH Freeman and Company, 1983.- 425 p.
17 . Erlenkotter D. A Dual-Based Procedure for Uncapacitated Facility Location. J. Operations Research, 26, 1978. - pp. 992-1009.
If you need to insert some work between the authors of Chvatal [16] and Erlenkotter [17], then all you need to do is add an empty line, copy the existing literature item (for example, Chvatal [16]) into it, replace the unique name work, replace the text description of the work and double-refresh the entire document.
Making links to elements of the list of used literature in the text
Now, perhaps, it is obvious how to make references to the literature in the text.
Knowing the unique names, it is enough to use the REF field
From the solution of the classical transport-type problem [ {REF lit_MEELIT1972 \ h} ] it follows that any basis of such a problem contains exactly m + s-1 elements. It follows from Danzig’s theorem [ {REF lit_CHVATAL1983 \ h} ] that all the elements of the basis in the formulated problem will be either zeros or natural numbers.
After the document is double-updated, this fragment of the text will take the following form:
From the solution of the classical problem of the transport type [ 26 ] it follows that any basis of such a problem contains exactly m + s-1 elements. It follows from Danzig’s theorem [ 16 ] that all the elements of the basis in the formulated problem will be either zeros or natural numbers.
After the document is double-updated, this fragment of the text will take the following form:
From the solution of the classical problem of the transport type [ 26 ] it follows that any basis of such a problem contains exactly m + s-1 elements. It follows from Danzig’s theorem [ 16 ] that all the elements of the basis in the formulated problem will be either zeros or natural numbers.
Making a list of used literature in order of appearance in the text
If the previous method turned out to be clear, then the design of the list of references in the order of appearance will also not be difficult. The links given at the end should now be placed directly in the text. If this source was first encountered, indicate the design of the form [ {SEQ LIT \ h} {SET lit_ERL1978 “{SEQ LIT \ c}”} {SEQ LIT \ c} , p. 18]. If this source has already been encountered before, indicate the design of the form [ {REF lit_ERL1978 \ h} , p. 95]. In the list itself, of course, you need to put the fields {REF lit_ERL1978 \ h}- links to the appearance of sources in the text. The whole difficulty lies in the manual arrangement of the full names of the sources. However, if somewhere in the text there will be changes in the order in which the links appear, then (after two updates) this will immediately affect the order in the list of references, which can be quickly corrected by cutting and pasting. An additional plus: checking the sequence of sources in this case is a “checksum”. Errors in the sequence are either absent or, if any, obvious.
Download a document in pdf format with preserving links
Well, perhaps the ending of this story. The document is ready. You can deal with its distribution, but do not want to give the original. There are two ways. The first is to replace links with their values using MS Office tools. This is achieved by pressing Ctrl + Shift + F9, however, the author strongly recommends against this.
Much more interesting is the upload of the document in pdf format. When unloading, you can replace the fields with values, thereby breaking the links to objects, or leave them. The advantage of the second case (why all this was done at all) is that when reading the text, the reader can click on one or another link to move to the desired formula, table, figure or item in the list of references. You can enable or disable this option when saving to pdf: Create bookmarks using: Word bookmarks .