restrain Section / Chapter break

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

restrain Section / Chapter break

sroth
Hi,

i hope restrain is correct for what i want.

I got a document an i will decide by my own where a page break should be inserted.
Just an automatic break should com if the page is full.

Regards
Sven
Reply | Threaded
Open this post in threaded view
|

Re: restrain Section / Chapter break

Alexander Schwartz
I assume you are using Asciidoctor-PDF for this, the ruby implementation, and you are looking for page breaks?

You can add manual page breaks using "<<<"

As default you have page breaks before parts and chapters. You can disable this in the theme (since 1.5.0-beta.3 if I am not mistaken, see https://github.com/asciidoctor/asciidoctor-pdf/issues/74).

See https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc on how to disable automatic page breaks: chapter-break-before and part-break-before.



Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de
Reply | Threaded
Open this post in threaded view
|

Re: restrain Section / Chapter break

sroth
Maby I'm a little bit stupid!?
Why is "auto" disabling the breaks? Where's the logic?

I tried wit "auto" and "false etc. , but nothing worked.

What code must be inserted in which place to control "breaks after a chapter" just by  myself?
heading:
  heading:
  font_style: bold
  h1:
    font_color: 999999
    font_style: italic
    align: right
  chapter:
    break_before: auto
    break_after: auto
  part:
    break_before: auto
    break_after: auto
Reply | Threaded
Open this post in threaded view
|

Re: restrain Section / Chapter break

mojavelinux
Administrator
Sven,

Asciidoctor PDF has built in logic for breaking before chapter titles and before and after part titles. As Alexander said, these breaks can be controlled using the heading-chapter-break-before, heading-part-break-before, and heading-part-break-after keys in the theme. Those are the only controls provided, atm. The value "auto" means to let it fall where it will fall...no added breaking logic.

> I got a document an i will decide by my own where a page break should be inserted.

Then I might recommend using the article doctype instead of the book doctype. The article doctype just lets the document flow. But it can be emulated by setting the keys mentioned above to "auto".


Best,

-Dan

On Wed, Nov 27, 2019 at 1:56 AM sroth [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Maby I'm a little bit stupid!?
Why is "auto" disabling the breaks? Where's the logic?

I tried wit "auto" and "false etc. , but nothing worked.

What code must be inserted in which place to control "breaks after a chapter" just by  myself?
heading:
  heading:
  font_style: bold
  h1:
    font_color: 999999
    font_style: italic
    align: right
  chapter:
    break_before: auto
    break_after: auto
  part:
    break_before: auto
    break_after: auto



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/restrain-Section-Chapter-break-tp7360p7371.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