Re: Problem with numbering of listings in a book
Posted by
David Jencks on
URL: https://discuss.asciidoctor.org/Problem-with-numbering-of-listings-in-a-book-tp7663p7672.html
OK, I read up on this :-)
If at the beginning of chapter 2 you have
:figure-caption: Figure 2.
Does the reference in chapter 1 turn out correct? I rather suspect it will still show Figure 1.10. If that is the case, perhaps all you can do is around each figure reference have
:chapter: 2
<<chap2.adoc#the-figure>>
:chapter: 1
I think I recall Dan making a comment that some way of handling situations like this better is needed…. I didn’t understand at the time why :-)
Hope this helps and that someone else has a better solution.
David Jencks
On Feb 24, 2020, at 3:53 PM, siddjain [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
I am not specifying the caption in the listing or figure itself. I have a preamble to the chapter where the captions are defined using these flags.
:figure-caption: Figure {chapter}.
:listing-caption: Listing {chapter}.
:table-caption: Table {chapter}.
= My Chapter Begins