master: doc: fix overlapping section numbers and title in the PDF toc
melisgl via Sbcl-commits <[email protected]> Mon, 29 Jun 2026 12:19:54 +0000
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via 55fe2df553beeebeaee4a5b18519e29f4de7b542 (commit)
from f319e996d1025a426eea1591ece8314b3ed6d6fd (commit)
- Log -----------------------------------------------------------------
commit 55fe2df553beeebeaee4a5b18519e29f4de7b542
Author: Gabor Melis <[email protected]>
Date: Mon Jun 8 15:38:44 2026 +0200
doc: fix overlapping section numbers and title in the PDF toc
---
contrib/sb-manual/make-pax-docs.lisp | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/contrib/sb-manual/make-pax-docs.lisp b/contrib/sb-manual/make-pax-docs.lisp
index f579d28d0..bc15ce955 100644
--- a/contrib/sb-manual/make-pax-docs.lisp
+++ b/contrib/sb-manual/make-pax-docs.lisp
@@ -34,6 +34,15 @@
,@(when source-uri-fn
`(:source-uri-fn ,source-uri-fn))))))
+;;; Adjust the width of section numbers in the PDF table of contents, so
+;;; that e.g "17.10.13" doesn't protude from its box.
+(defparameter *pandoc-pdf-adjusted-table-of-contents
+ "\\makeatletter
+% \\@dottedtocline{level}{indent_before_number}{width_of_number_box}
+\\renewcommand*\\l@subsection{\\@dottedtocline{2}{1.5em}{2.8em}}
+\\renewcommand*\\l@subsubsection{\\@dottedtocline{3}{4.3em}{4.0em}}
+\\makeatother")
+
(defun make-pax-docs (&optional git-forge-uri)
(switch-to-pax)
(let ((*git-forge-uri* (or (and (plusp (length git-forge-uri))
@@ -43,8 +52,12 @@
(*output-dir* (merge-pathnames "output/" *directory*))
(pax:*document-downcase-uppercase-code* t)
(pax:*document-url-versions* '(1))
- (pax::*document-pandoc-pdf-options*
- (remove "--verbose" pax::*document-pandoc-pdf-options*
+ (pax:*document-pandoc-pdf-header-includes*
+ (format nil "~A~%~A~%"
+ pax:*document-pandoc-pdf-header-includes*
+ *pandoc-pdf-adjusted-table-of-contents))
+ (pax:*document-pandoc-pdf-options*
+ (remove "--verbose" pax:*document-pandoc-pdf-options*
:test #'equal)))
(format t "Git root: ~A~%Git forge URI: ~A~%Output dir: ~A~%"
*git-root* *git-forge-uri* *output-dir*)
@@ -60,5 +73,6 @@
:target-dir (merge-pathnames "html/"
*output-dir*)
:style :charter)))
+
#+nil
(make-pax-docs)
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL