Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ This file documents recent notable changes to this project. The format of this
file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Improved generated PDF readability by reducing awkward page breaks, sparse pages, and layout issues around common documentation blocks.

## [0.1.0] - 2026-03-30

### Added
Expand All @@ -29,4 +35,5 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Added release workflow to create GitHub Releases from tags using
CHANGELOG.md.

[Unreleased]: https://github.com/aicers/docs-theme/compare/0.1.0...HEAD
[0.1.0]: https://github.com/aicers/docs-theme/tree/0.1.0
28 changes: 28 additions & 0 deletions templates/api-reference/pdf/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,31 @@ article#doc-toc li>a {
display: inline-block;
line-height: 0.5;
}

article:not(#doc-cover):not(#doc-toc) section + section {
break-before: auto !important;
page-break-before: auto !important;
min-height: auto !important;
}

article:not(#doc-cover):not(#doc-toc) h2,
article:not(#doc-cover):not(#doc-toc) h3,
article:not(#doc-cover):not(#doc-toc) h4,
article:not(#doc-cover):not(#doc-toc) h5 {
break-after: avoid !important;
page-break-after: avoid !important;
}

article:not(#doc-cover):not(#doc-toc) table,
article:not(#doc-cover):not(#doc-toc) pre,
article:not(#doc-cover):not(#doc-toc) blockquote,
article:not(#doc-cover):not(#doc-toc) ul,
article:not(#doc-cover):not(#doc-toc) ol,
article:not(#doc-cover):not(#doc-toc) div.highlight,
article:not(#doc-cover):not(#doc-toc) div.tabbed-content--wrap,
article:not(#doc-cover):not(#doc-toc) div.admonition {
break-before: auto !important;
page-break-before: auto !important;
break-inside: auto !important;
page-break-inside: auto !important;
}
28 changes: 28 additions & 0 deletions templates/manual/pdf/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,31 @@ article#doc-toc li>a {
display: inline-block;
line-height: 0.5;
}

article:not(#doc-cover):not(#doc-toc) section + section {
break-before: auto !important;
page-break-before: auto !important;
min-height: auto !important;
}

article:not(#doc-cover):not(#doc-toc) h2,
article:not(#doc-cover):not(#doc-toc) h3,
article:not(#doc-cover):not(#doc-toc) h4,
article:not(#doc-cover):not(#doc-toc) h5 {
break-after: avoid !important;
page-break-after: avoid !important;
}

article:not(#doc-cover):not(#doc-toc) table,
article:not(#doc-cover):not(#doc-toc) pre,
article:not(#doc-cover):not(#doc-toc) blockquote,
article:not(#doc-cover):not(#doc-toc) ul,
article:not(#doc-cover):not(#doc-toc) ol,
article:not(#doc-cover):not(#doc-toc) div.highlight,
article:not(#doc-cover):not(#doc-toc) div.tabbed-content--wrap,
article:not(#doc-cover):not(#doc-toc) div.admonition {
break-before: auto !important;
page-break-before: auto !important;
break-inside: auto !important;
page-break-inside: auto !important;
}