info:asciidoc:pdfnumbering

Asciidoctor: pagination pdf

Je désespérais pour ajuster la pagination générée depuis asciidoctor et j'ai eu une réponse de Dan Allen mojavelinux aka “ze guru of asciidoc”, https://github.com/asciidoctor/asciidoctor-pdf/issues/1602

Correct me if I'm wrong, but I assume what you mean is that the page number is too close to the bottom of the page. That can be adjusted.

Your page margin is 2cm. Typically, you want your running content height to match this value. So first, you'd set the height of the footer to 2cm.

footer:

height: 2cm
...

If you want to see the area that the footer takes up, you can shade the background temporarily.

footer:

height: 2cm
background-color: #CCCCCC

By doing that, you can see that the number is not quite at the top of the box. That's because there is a padding applied by default. You can remove that:

footer:

height: 2cm
padding: 0
...

Now the page number should be plenty far from the edge of the page. But you can continue to make adjustments.

For more info, refer to the theming guide for the running content: https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#key-prefix-footer

(Keep in mind that while the theme looks like CSS, it's not CSS. It's just inspired by CSS).

  • info/asciidoc/pdfnumbering.txt
  • Dernière modification : 2020/03/13 06:15
  • de radeff