asciidoctor-pdf: Can't control PDF TOC output location
I am unable to prevent the TOC coming out as the very first set of pages in the PDF. I want them in a controllable location later in the document (after Amendments table, Acknowledgements).
I tried :toc: macro
at the top, and toc::[]
at the desired location, but this has no effect. Ideally I need a solution that also enables the same source to generate an HTML output with TOC on the left. I don’t mind invoking asciidoctor with different command lines if need be to achieve this.
UPDATE: I discovered that if I put :toc: macro below the title heading (first = xxxx line), that no TOC at all comes out even with the toc::[] later on. No idea what is going on now. Why does it matter where the :toc: line goes?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 18
- Comments: 15 (8 by maintainers)
Commits related to this issue
- partially resolves #233 TOC placed directly after title, and no page break after TOC when doctype is article — committed to ogmios-voice/asciidoctor-pdf by ogmios-voice 6 years ago
- resolves #233 insert toc between doctitle and content for article doctype by default - if article is doctype, toc is set, and title-page is not set, insert toc betwen doctitle and content - set base ... — committed to mojavelinux/asciidoctor-pdf by mojavelinux 5 years ago
- resolves #233 insert toc between doctitle and content for article doctype by default - if article is doctype, toc is set, and title-page is not set, insert toc betwen doctitle and content - set base ... — committed to mojavelinux/asciidoctor-pdf by mojavelinux 5 years ago
Currently the location of the toc cannot be controlled in PDF. Part of the reason is that it’s very complicated to calculate the page offsets as it is, and moving it makes it even more complicated. We just need some better abstractions so that moving the toc around doesn’t break other things.