Re: Incorrect figure numbering when my document is split across multiple files
Posted by
mojavelinux on
Oct 17, 2019; 7:08am
URL: https://discuss.asciidoctor.org/Incorrect-figure-numbering-when-my-document-is-split-across-multiple-files-tp7235p7236.html
The reftext is only used in an xref. The number used in the caption is provided by built-in behavior.
Best,
-Dan
On Wed, Oct 16, 2019 at 5:04 PM siddjain [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
I have a document that is split into multiple files. My top level adoc looks like this:
:doctype: book
:leveloffset: 1
include::chap01.adoc[]
include::chap02.adoc[]
My chap02.adoc header has
and I insert images into the chapter like
[id=transaction_flow, reftext={chapter}.{counter:figure}]
.Lifecycle of a transaction.
image::transaction_flow.png[]
The problem I am running into is that the figure captions in chapter 2 do not start with Figure 2.1 even though I reset the figure counter to 0 in the header of chapter 2. Instead they start with Figure 2.X where X = count of figures in chapter 1 + 1. How can
I fix this?
--