epub2md/pandoc/print.css
dschlueter 13617c8d3e feat: pandoc/print.css – Druck-Layout für PDFs mit weasyprint
- A4, Seitenzahlen, jedes Kapitel auf neuer Seite, Inhaltsverzeichnis auf
  eigener Seite, Silbentrennung (nicht in Code), umbrechende Codezeilen;
  bringt Grundschrift und Titelkopf mit, da --css Pandocs Standard-CSS ersetzt
- Buch-README: zusätzlicher weasyprint-Befehl mit Filter und print.css
- Doku: Bedienungsanleitung und README um den weasyprint-Weg ergänzt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 06:03:55 +02:00

19 lines
1.4 KiB
CSS

/* Print layout for PDFs from epub2md output via Pandoc + weasyprint:
pandoc buch.md -s --toc --lua-filter pandoc/callouts.lua --css pandoc/print.css --pdf-engine=weasyprint -o buch.pdf */
@page { size: A4; margin: 2cm 1.8cm; @bottom-center { content: counter(page); font-size: 9pt; } }
body { max-width: none; font-size: 10.5pt; line-height: 1.4; hyphens: auto; text-align: justify;
font-family: "DejaVu Serif", "Liberation Serif", Georgia, serif; }
#title-block-header, #title-block-header h1.title { text-align: center; margin-bottom: 2em; }
h1, h2, h3, h4 { text-align: left; hyphens: manual; page-break-after: avoid; }
pre, code { font-family: "DejaVu Sans Mono", "Liberation Mono", monospace; hyphens: none; }
pre { background: #f6f8fa; padding: 0.5em 0.8em; border-radius: 0.3em; page-break-inside: auto; }
blockquote { margin: 1em 0 1em 1.5em; padding-left: 0.8em; border-left: 2px solid #ccc; color: #444; }
nav#TOC ul { list-style: none; padding-left: 1.2em; }
a { color: inherit; text-decoration: none; }
pre, pre code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 8.5pt; } /* long code lines wrap */
pre { overflow: visible; }
img { max-width: 100%; height: auto; }
h1 { page-break-before: always; } /* every chapter on a new page */
#title-block-header h1, #TOC h1 { page-break-before: auto; }
nav#TOC { page-break-after: always; }
table { font-size: 9pt; }