Closed lurch closed 2 years ago
This is not a can of worms I'm interested in opening up. If this is something you want to do, you can extend the converter and add this behavior. It's less complex now that the converter updates the page margins based on the layout (i.e., orientation), but there are likely still a lot of edge cases to consider.
This is not a can of worms I'm interested in opening up.
LOL, feel free to close this issue then :slightly_smiling_face: :snake:
To be clear, this converter is already getting entirely too complicated, and this will just compound the number of permutations that have to be handled and tested. This is where we draw the line and say that it's a goal for the HTML-based converter that will succeed this one.
I'll mark it as future to give someone a chance to come along and put forth a proposal. But it can't introduce too much complexity.
You can now do this using an extended converter. Here's an example:
class PDFConverterNarrowTOC < (Asciidoctor::Converter.for 'pdf')
register_for 'pdf'
def ink_toc *_args
indent 100, 100 do
super
end
end
end
Here's the result:
I've got a "big" header (because I'm including a logo-image)
and so I've adjusted my page margins as https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#keys-running-content says to do:
However as
running-content-start-at
defaults tobody
, this means I also have a big (empty) page-margin on my TOC pages too, which looks a bit odd.I guess as a workaround I can set
but perhaps it might be useful if there was a way to specify different page-margins for pages which do and don't display "running content"?