Create Style, Example 3: Numbering Style

The following comes from an actual duxuser list question.

The problem: We produce a lot of double-sided documents where we wish to begin with Roman Page Numbers, as in i, ii, iii, iv, etc., but then wish to continue with Arabic Numbers, as in 1, 2, 3, 4. However, we want to start the Arabic numbers on an odd, or right hand, page. Also, if the preceding (Roman numbered page) contains no text, we do not want it to be numbered.

Create a new document (File: New) using an existing Template which is as close to your requirements as possible. For this example, we will use "English (American) - Standard Literary Format".

As we wish to begin all documents with Roman numbers. We can do this in two ways. (We will explain the difference afterwards)

  1. Go to the Layout menu, select Page Numbering, and in the dialog that comes up, leave the Start Page Numbering at 1, and select the "Roman" radio button. This will insert two codes into our document - [pv1] and [pntr] which mean, Start Page Numbering at 1, and make them Roman Numbers.

or

  1. Go to the Document menu, and select Add Style. Before you proceed, look in the list of existing Styles to see if there is one called "initial". If you are following this example, there will not be, so in the "New Style Name:" text box type (without quotes) the word "initial", and be very careful to spell it exactly as shown. Press the OK button, and a new dialog will appear called "Edit Style Codes".
    With your cursor In the "Beginning Codes:" text box, hold down the Ctrl key, and press the left square bracket. A pair of square brackets will appear, with your cursor between them. Type "pv1", (no quotes) and press the End key to place your cursor to the right outside the Code. Hold down the Ctrl key again, press left square bracket, and between the brackets type "pntr" (no quotes). Tab to the OK button and press it.

So what is the difference between 1st and 2nd method since both will result in Roman numbers in our document.

We will now actually create the new Template. (Document: Create Template) You now need to give your new Template a meaningful name. In this case we will call it, "Hotel Room Details".

We have a new Template, so to be sure, close it.

Start a New document, and this time, "Hotel Room Details" should be in our list of Templates.

To be doubly sure what we have done so far works, type in a few words of text, and make sure that Roman numbers appear.

OK but how, after say three pages, do we make the fourth page with no text totally blank, and begin the fifth page with Arabic number one?

At the very end of the section which is Roman numbered, we would have these Codes in the following order.

[svpnp0:0] Do not number left or right hand pages. (That stops numbering on the blank page)

[sdo] Advance to an odd (right hand) page.

[pg1] Begin numbering at 1.

[pnta] Make that numbering Arabic.

[svpnp2:2] Number odd and even pages.

But ouch! That is a lot to remember every time you do one of these Hotel Room things!!

No problem. Let us create a Style to do all of that.

From the Document menu, select "Add Style".

In the "New Style Name" box type a meaningful name like "ArabicRightHand" - again no quotes, but also no spaces.

Press the OK button, and up will pop the "Edit Style Codes" dialog.

In the same way as you entered Codes for the Roman numbering, enter the above Codes into the "Beginning Codes"

box. svpnp0:0 sd0 pg1 pnta svpnp2:2 There is no need to type anything into the "Ending Codes" box.

Press OK

Now we have a Style called "ArabicRightHand", but we are not quite finished.

First, you might want to test the Style. Type some text at the beginning of the document, place your cursor at the end of the Arabic Numbered section, and from the Layout Menu, select Apply Style, then select "ArabicRightHand". If it does not work as expected, check for mistakes, and go back to Document: Amend Style where you can rectify any mistakes.

Finally, and this is VERY important, once this is working, go to the Document Menu, select "Create Template". Navigate down the list to "Hotel Room Details" and press OK. You will be asked if you wish to replace the existing Template - select YES!. When asked if you wish to save Codes and text, select NO!

You should now have a Template which will begin with Roman Numbering then, when you apply the ArabicRightHand Style at the correct place in your document, text will begin on a right hand page with Roman numbers.