Skip to content

Commit 1c1f73f

Browse files
supachai-jclaude
andcommitted
Keep the TOC on a single page (tighten spacing)
The English TOC spilled its last two entries onto a second, near-empty page. Tighten the TOC line-height, font-size and paragraph/list margins in print so all 25 entries fit on one page in both languages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent be82499 commit 1c1f73f

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

book-en/css/custom.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@
8989
@media print {
9090
/* no page-break here: mdBook already starts each chapter on a fresh page; adding our
9191
own break double-broke and left a blank page before the TOC. */
92-
.okf-tocpage ul { list-style: none; padding-left: 0.4rem; }
92+
/* tighten so all entries fit on ONE page (EN entries were spilling 2 lines over) */
93+
.okf-tocpage { line-height: 1.4; font-size: 0.95rem; }
94+
.okf-tocpage h1 { margin-bottom: 0.4rem; }
95+
.okf-tocpage p { margin: 0.45rem 0 0.05rem; }
96+
.okf-tocpage strong { font-size: 0.97rem; }
97+
.okf-tocpage ul { list-style: none; padding-left: 0.4rem; margin: 0.1rem 0; }
98+
.okf-tocpage li { margin: 0.03rem 0; }
9399
.okf-tocpage li { display: flex; align-items: flex-end; }
94100
.okf-tocpage li > a { flex: 0 1 auto; }
95101
/* leader dots show only when a real page number was injected */

book/css/custom.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@
8989
@media print {
9090
/* no page-break here: mdBook already starts each chapter on a fresh page; adding our
9191
own break double-broke and left a blank page before the TOC. */
92-
.okf-tocpage ul { list-style: none; padding-left: 0.4rem; }
92+
/* tighten so all entries fit on ONE page (EN entries were spilling 2 lines over) */
93+
.okf-tocpage { line-height: 1.4; font-size: 0.95rem; }
94+
.okf-tocpage h1 { margin-bottom: 0.4rem; }
95+
.okf-tocpage p { margin: 0.45rem 0 0.05rem; }
96+
.okf-tocpage strong { font-size: 0.97rem; }
97+
.okf-tocpage ul { list-style: none; padding-left: 0.4rem; margin: 0.1rem 0; }
98+
.okf-tocpage li { margin: 0.03rem 0; }
9399
.okf-tocpage li { display: flex; align-items: flex-end; }
94100
.okf-tocpage li > a { flex: 0 1 auto; }
95101
/* leader dots show only when a real page number was injected */

0 commit comments

Comments
 (0)