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

Error in toc extent calculation #2208

Closed
mojavelinux opened this issue May 25, 2022 · 1 comment
Closed

Error in toc extent calculation #2208

mojavelinux opened this issue May 25, 2022 · 1 comment
Assignees
Milestone

Comments

@mojavelinux
Copy link
Member

If a TOC entry does not have an ID, that entry an all of its descendants will be skipped when computing the extent of the TOC. However, by the time the TOC is inked in the main document, this entry will have a pdf-anchor attribute, which will cause it to be included in the TOC. As a result, the TOC extent calculation will be incorrect and it will overrun the first page of content in the body.

This is a regression introduced by f8fa537.

There is still a larger issue here, which is that entries that were not included in the extent calculation end up being included when the TOC is added to the primary document. This issue only deals with the fact that the children were excluded in the TOC extent calculation.

@mojavelinux mojavelinux self-assigned this May 25, 2022
@mojavelinux mojavelinux added this to the v2.0.x milestone May 25, 2022
@mojavelinux
Copy link
Member Author

This issue can only be observed when the sectids attribute is turned off for parts of a document, which is not a typical usage of AsciiDoc.

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue May 25, 2022
mojavelinux added a commit that referenced this issue May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant