From d833757854bda981e85995b7678f40e5548cef37 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 6 Apr 2024 23:42:05 +0200 Subject: [PATCH] epub: Remove extra page breaks before headings The sections are pretty short, leading to unnecessary pagination being required. --- default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default.nix b/default.nix index 1d88a20..c03eab1 100644 --- a/default.nix +++ b/default.nix @@ -68,6 +68,8 @@ sed -Ei 's~(.+) \{#([^\}]+)\}()~\1 id="\3"\2\4~g' OEBPS/*.html # Fix broken links in body. sed -Ei 's/("[0-9a-z-]+\.)md(["#])/\1html\2/g' OEBPS/*.html + # Remove unnecessary page breaks, the sections are short. + substituteInPlace OEBPS/stylesheet.css --replace-fail "page-break-before: always;" "" zip -q "../book/epub/Nix Pills.epub" **/* )