Login  Register

content-margin for header not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

content-margin for header not working

cwempe
3 posts
Hello,

I just started using AsciiDoc(tor).
I am using VScode with the AsciDoc extension and "asciidoctor-pdf" to generate a pdf.

I try to imitate the word template our university is providung to match the CI.

On of the last settings I need to adapt is the margin for the header (running-content).

The original template wants the page number at the top right of the page.
But slightly more to the right than the page margin.


I thought this should work:


page:
  margin: [20mm, 19.7mm, 24mm, 32.8mm]
header:
  recto:
    content-margin: [inherit, 16.9mm, inherit, inherit]
    left:
      content: '{chapter-title}'
    center:
      content: ''
    right:
      content: '{page-number}'


I tried other variations of this and also "margin:", but nothing changed.

Any idea what I am doing wrong?
Is this even supposed to work or am I trying the impossible?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: content-margin for header not working

mojavelinux
Administrator
2681 posts
The ability to control the margins for the running content won't be available until the Asciidoctor PDF 2 release. See https://github.com/asciidoctor/asciidoctor-pdf/issues/994 (notice the milestone)

Best Regards,

-Dan

On Wed, Apr 22, 2020 at 6:47 AM cwempe [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I just started using AsciiDoc(tor).
I am using VScode with the AsciDoc extension and "asciidoctor-pdf" to generate a pdf.

I try to imitate the word template our university is providung to match the CI.

On of the last settings I need to adapt is the margin for the header (running-content).

The original template wants the page number at the top right of the page.
But slightly more to the right than the page margin.


I thought this should work:


page:
  margin: [20mm, 19.7mm, 24mm, 32.8mm]
header:
  recto:
    content-margin: [inherit, 16.9mm, inherit, inherit]
    left:
      content: '{chapter-title}'
    center:
      content: ''
    right:
      content: '{page-number}'


I tried other variations of this and also "margin:", but nothing changed.

Any idea what I am doing wrong?
Is this even supposed to work or am I trying the impossible?



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/content-margin-for-header-not-working-tp7944.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: content-margin for header not working

cwempe
3 posts
Ok.
Thanks.

But then the documentation is misleading because it shows options that are not available, yet. Right?

https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#running-content-header--footer
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: content-margin for header not working

mojavelinux
Administrator
2681 posts
You're looking at the documentation for master, which represents the unreleased version. If you want the documentation for the released version, you need to be looking at the v1.5.x branch:


or better yet, the v1.5.3 tag:


Best Regards,

-Dan

On Thu, Apr 23, 2020 at 4:30 AM cwempe [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ok.
Thanks.

But then the documentation is misleading because it shows options that are not available, yet. Right?

https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#running-content-header--footer


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/content-margin-for-header-not-working-tp7944p7950.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux