Login  Register

counter Problems with images and plantuml

Posted by Hendrik Timmermann on Nov 05, 2019; 8:28am
URL: https://discuss.asciidoctor.org/counter-Problems-with-images-and-plantuml-tp7320.html

Hello , i work with maven

                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>2.0.0-RC.1</version>
                <dependencies>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj-pdf</artifactId>
                        <version>1.5.0-beta.4</version>
                    </dependency>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj-diagram</artifactId>
                        <version>1.5.18</version>
...
                       <require>asciidoctor-diagram</require>
                    </requires>

related?

Assign image captions in extension #165  or #164 #169   (issue in asciidoctor diagramm) seem to be similar?


the following situation:

:desc-image1: description image 1
[id="image1",reftext="{figure-caption} {counter:figures}"]
.{desc-image1}
image::image1.png[align="center"]

:desc-plantuml: description plantuml
[id="plantuml",reftext="{figure-caption} {counter:figures}"]
.{figure-caption} {figures}: {desc-plantuml}
plantuml::images/plantuml.puml[align="center"]

:desc-image2: description image 2
[id="image2",reftext="{figure-caption} {counter:figures}"]
.{desc-image2}
image::image2.png[align="center"]

----
please observe, I added {figure-caption} {figures}:  
---
with this a have two problems (The images are correct!):

1) a wrong numbering of the image2 in the text  (html and pdf)

Figure 2: description image 2   expected    Figure 3: description image 2

2) The Caption and the number is not generated automatically at plantuml . Why?

Figure 1: description image 1
description plantuml                 expected    Figure 2: description plantuml
Figure 2: description image 2   expected    Figure 3: description image 2

is the problem located in line 609 of parser.rb the reason in 2.0.0.RC1?

Is the increment of the counter in plantuml not considered in images?