From 09a79b5c49831b0c35a99b849a5795943f674756 Mon Sep 17 00:00:00 2001 From: Jannik Meier Date: Tue, 9 Jun 2026 21:19:12 +0200 Subject: [PATCH] fix: wrapping of texts --- templates/sm-defaults.yaml | 1 + templates/sm-template.tex | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/templates/sm-defaults.yaml b/templates/sm-defaults.yaml index 77d3067..af1bd83 100644 --- a/templates/sm-defaults.yaml +++ b/templates/sm-defaults.yaml @@ -2,6 +2,7 @@ from: markdown+smart+fenced_code_blocks+inline_code_attributes+bracketed_spans to: pdf # template wird im Makefile als absoluter Pfad übergeben (wegen cd-Aufruf) pdf-engine: pdflatex +listings: true citeproc: true number-sections: true standalone: true diff --git a/templates/sm-template.tex b/templates/sm-template.tex index a5a4d48..a3b7381 100644 --- a/templates/sm-template.tex +++ b/templates/sm-template.tex @@ -28,6 +28,8 @@ \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} +% pandoc 3.x sets \LTcaptype=none for captionless longtables; caption tries to \stepcounter{none} +\newcounter{none} \usepackage{xcolor} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} @@ -42,10 +44,21 @@ % --- Code --- \usepackage{fancyvrb} \usepackage{listings} +\lstset{ + basicstyle=\ttfamily\small, + breaklines=true, + breakatwhitespace=false, + columns=fullflexible, + keepspaces=true, +} $if(highlighting-macros)$ $highlighting-macros$ $endif$ +% ngerman macht " zu einem aktiven Shorthand ("u→ü, "a→ä, "r→Trennung). +% Da Umlaute direkt als UTF-8 geschrieben werden, ist der Shorthand nicht nötig. +\AtBeginDocument{\shorthandoff{"}} + % --- Hyperlinks --- \usepackage{hyperref} \hypersetup{ @@ -61,10 +74,12 @@ $endif$ % --- Pandoc compatibility --- \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +\providecommand{\passthrough}[1]{#1} % --- Absatzformatierung: kein Einzug, sichtbarer Abstand zwischen Absaetzen --- \setlength{\parindent}{0pt} \setlength{\parskip}{0.6\baselineskip} +\setlength{\emergencystretch}{3em} % --- Section breaks: jede H1 (section) beginnt auf einer neuen Seite --- \let\oldsection\section