0

In MS Word.

If heading one is numbered using roman numbers, when the figure caption also includes chapter numbers, roman numbers will be used like this: "II-1", but what I want is "2-1". How can I achieve this?

enter image description here

  • Do your chapter titles have to use Roman numerals? It seems to me that the quickest fix would be to use Arabic numerals for the chapter headings and then have the figures automatically numbered the way you want. – Kelly Tessena Keck Jan 13 '15 at 17:31
4

Personally I think it is confusing to vary numbering styles in this way, but...

There are various ways you could do it, but if the document is being created/maintained by others you will need to tell them how to maintain it.

The starting point is to look at what Word normally inserts. If you press Alt-F9 and look at your first Figure caption you will probably see this:

Figure { STYLEREF 1 \s }-{ SEQ Figure \* ARABIC \s 1 } apple

What you really need to do is replace { STYLEREF \1 s } by something else in every Figure caption. IN my view, the simplest way to do it is to ensure that you put the following field somewhere in every paragraph with style Heading 1:

{ SEQ Chap \h }

then use the following coding for your Figure caption:

Figure { SEQ Chap \c }-{ SEQ Figure \* ARABIC \s 1 } 

You can put that in an autotext/building block to make it easier to insert. (* ARABIC is the default format so you do not really need it).

As usual, all the { } have to be the special field brace pairs that you can insert in Windows Word using ctrl-F9.

As an aside, if your chapter numbers were 1, 2, 3 and you wanted I, II, III in your captions, you could probably avoid having extra fields and change the STYLEREF field to be

{ STYLEREF 1 \s \*Roman }

However, I do not think there is any switch that will transform a roman numeral into a decimal number.

Another way would be to use the result of the STYLEREF field to construct the name of a Document Property, or Document Variable. e.g. suppose you know that you will only ever have 4 chapters, I, II, III and IV. I leave you to find out how to create such properties/variables.

Then in theory you could create Custom Document Properties called I, II, III, IV with values 1,2,3,4

and instead of

{ STYLEREF 1 \s }

use

{ DOCPROPERTY { STYLEREF 1 \s } }

"In theory" you could also do this using REF fields, e.g. have

{ SET I 1 }{ SET II 2 }{ SET III 3 }{ SET IV 4 }

at the beginning of your document or in a header footer, then

{ REF { STYLEREF 1 \s } }

in your caption.

But it doesn't work here, and it was difficult to see why until I worked out that the { STYLEREF } field inserts an invisible "Left-To-Right Mark" at the beginning of the result of the STYLEREF field.

  • It works fine, but when I use cross reference to refer that figure only first part is shown, e.g.: "figure 2" not "figure 2-1", why? – Yishu Fang Jan 13 '15 at 8:46
  • Because Word looks for a specific field code structure when it makes cross-references. If you want to do that as well, I think you will have to bookmark the "Figure 2-1" part yourself and reference that bookmark. In addition, I would verify that a Table of Figures works with these field codes (I did that here and it seems OK). This is one reason why deviating from the built-in support provided by Word is typically more trouble than it is worth. – user181946 Jan 13 '15 at 8:55
0

You can right click on the header number and select "adjust list indents" and then check the box that says "Legal Style Numbering". Then you can right click on the style in the ribbon and select "Update X to match section".

  • This works for the section heads at least. – matthew davidson Jul 22 '17 at 21:17
0

I've got a better solution:

Number the chapter headers with Arabic numerals and then use hidden formatting (ctrl+shift+h) to hide the number and manually write "Chapter I", "Chapter II", etc. It's not the prettiest solution, but I think it's the easiest. ToC should use whatever you've written there so you can manually change that too if you need to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.