diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-04-12 16:02:52 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-04-12 16:02:52 -0600 |
| commit | 0169ce4391e8fd9ff02b9f754d9c4cedc6f19594 (patch) | |
| tree | de96bfe3dde399071cd93e2fd16a4e3cb67c5da1 /docs | |
| parent | 340e47407a666c64ae8282cb5f27b25b5539a472 (diff) | |
add tip about how to keep section title with multiple ensuing blocks
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/modules/ROOT/pages/breakable-and-unbreakable.adoc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/docs/modules/ROOT/pages/breakable-and-unbreakable.adoc b/docs/modules/ROOT/pages/breakable-and-unbreakable.adoc index 1253fd35..a4a8ed00 100644 --- a/docs/modules/ROOT/pages/breakable-and-unbreakable.adoc +++ b/docs/modules/ROOT/pages/breakable-and-unbreakable.adoc @@ -62,7 +62,7 @@ The `breakable` option can be applied to a section to ensure the section title i [,asciidoc] ---- [%breakable] -=== Title of a section +=== Title of Section First block of content in the section. ---- @@ -72,7 +72,7 @@ This option can also be added to a discrete heading to ensure the heading is kep [,asciidoc] ---- [discrete%breakable] -=== Discrete heading +=== Discrete Heading Next block of content. ---- @@ -82,7 +82,24 @@ In other words, the option prevents a page break immediately following the title Instead, the page break will come _before_ the title. This option does not make the converter attempt to keep an entire section on the same page. -If you want to enable this feature for all sections and discrete headings, you can set the `heading-min-height-after` theme key to `auto` instead. +However, you can get the section title to stick with more than one block by wrapping the blocks that follow it in an unbreakable block. + +[,asciidoc] +---- +[%breakable] +=== Title of Section + +[%unbreakable] +-- +First block of content in the section. + +Second block of content in the section. +-- +---- + +In this case, the section will follow the unbreakable block if it gets advanced to the next page. + +If you want to prevent all sections and discrete headings from being orphaned globally, you can set the `heading-min-height-after` theme key to `auto` instead. [,yaml] ---- |
