Resetting figure number i caption

M

Martin Andersen

I am trying to implement the directions in an article by Pietsch and Rado
"How to insert captions that include chapter numbers, in documents where
some heading styles are not build in".
I have created headings with numbering in four levels based on the build-in
headings without numbers. At the same time i have created headings for
appendices in four levels, also based on the build-in headings without
numbers.

Now i want to create captions for figures where the heading number of the
first level is included in the caption, together with the number of the
figure, where the figure number is reset after that the level one heading has
been incremented.

The syntax suggested by Pietsch and Rado is:
Figure {styleref "Heading 1 with numbers" \s}.{seq Figure \* ARABIC \s
"Heading 1 with numbers"}. Figure text.
A similar syntax should then be used in for captions in appendices.

The \s in the styleref field has the effect that only the heading number of
the heading is shown. The effect of the \s "Heading 1 with numbers" in the
seq field should according to the article mentioned above have the effect
that the sequence of figure numbers is reset.

My problem is now that this doesn't happen. In chapter 2 i have two figures,
and they are labeled correctly as figure 2.1 and figure 2.2. But when i use
exactly the same syntax (copy and paste) in chapter 3, the numbering in the
caption becomes 3.3. The sequence of figure numbers is not reset.

Margeret Aldis suggested that this could be caused by some hidden formatting
in the heading of chapter 3. As a consequence of this i tried to apply the
strip formatting style to the heading and then formatting it with the heading
1 with numbers again. This didn't help.

My interpretation of this is that the sequence field for some reason dont
pick up the incrementation of the heading 1. I have read at little about the
numbering in Word, and it seems to be rather complicated.

Does anyone have an idea about why this happens?
 
S

Stefan Blom

In my experience, the \s switch works only to restart SEQ numbering after
built-in headings (at the specified level). If built-in headings are not
used, manual restarts of SEQ fields -- using the \r switch -- are required.
 
M

Martin Andersen

I inserted the field {seq Figur \r 0 \h} in the heading where i wanted the
figure numbering sequence to be reset. The \h switch makes the field hidden,
and \r 0 sets the figure number to zero, so that the first figure in the
chapter has the number 1. Exactly what i wanted. Thanks a lot.

Regards, Martin

"Stefan Blom" skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top