Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong numeration of appendix chapters #33

Open
stfnp opened this issue Mar 31, 2022 · 4 comments
Open

Wrong numeration of appendix chapters #33

stfnp opened this issue Mar 31, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@stfnp
Copy link

stfnp commented Mar 31, 2022

When using the [appendix] annotation, the numeration (A, B, C, ...) of the chapters shown in the table of contents seems to be wrong.

Below is a simple example that has two top-level appendix chapters with two subsections each. The result produced by asciidoctor-multipage book.adoc (version 0.0.15 using asciidoctor version 2.0.17) is shown in the screenshot below: The top-level chapters of the appendix are incorrectly named C and D in the table of contents, but are correctly named A and B in the document itself. The subsections however are named correctly in both places. When testing the same input with the standard single-page html5 converter it produced the expected result, so I hope my input is right.

Input

= Appendix-Test
:doctype: book
:lang: en
:toc: left
:toclevels: 2
:numbered:

[appendix]
== First Chapter

=== First Section

=== Second Section

[appendix]
== Second Chapter

=== First Section

=== Second Section

Output

multi-page

@owenh000
Copy link
Owner

owenh000 commented Apr 3, 2022

@stfnp, I see the same behavior. Thanks for the report!

@owenh000 owenh000 added the bug Something isn't working label Apr 3, 2022
@owenh000
Copy link
Owner

See also duplicate issue #37, particularly the test case in this comment.

This incorrect behavior still occurs with Asciidoctor v2.0.17 and asciidoctor-multipage v0.0.16.

@NGRsoftlab
Copy link

Hello, is there any solution for the problem? We've got the same issue. Example:

= Book
:doctype: book
:lang: ru
:toc: macro
:toclevels: 6
:sectnums:
:sectnumlevels: 6
:xrefstyle: short
:appendix-number: 0

== chap1

Some text

== chap2

Some text

== chap3

Some text

== chap4

Some text

== chap5

Some text

== chap6

Some text

== chap7

Some text

== chap8

Some text

== chap9

Some text

== chap10

Some text

== chap11

Some text

== chap12

Some text

== chap13

Some text

== chap20

Some text

[appendix]
== app1

Some appendix

[appendix]
== app2

Some appendix

[appendix]
== app3

Some appendix

[appendix]
== app4

Some appendix

[appendix]
== app5

Some appendix

Transformation:

asciidoctor-multipage \
            -D html-out \
            -a toc=left \
            -a docinfo=shared \
            -a chapter-signifier="" \
            -a chapter-refsig="" \
            -a section-refsig="" \
                book.adoc

Result:

image

@owenh000
Copy link
Owner

owenh000 commented Apr 3, 2024

This issue requires #46 to be done first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants