template-ebook/styles/print-template.tex
2025-06-21 14:46:00 +02:00

99 lines
2.2 KiB
TeX
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% Tex Template für Rust Handbuch
\documentclass[11pt,a4paper]{article}
% Workaround für Pandoc: tightlist definieren
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\usepackage{xfp} % <-- ganz nach oben!
\usepackage{expl3} % <-- optional, bei manchen TeX-Installationen nötig
% Schriftarten
\usepackage{fontspec}
\setmainfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
%\setmonofont{Symbola}
%\setmonofont{Fira Code}
%\newfontfamily\emoji{Noto Color Emoji}
\usepackage[ngerman]{babel}
\usepackage{parskip}
\usepackage{geometry}
\geometry{margin=2.5cm}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage{emptypage}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{calc}
\usepackage{amssymb} % Mathematische Sonderzeichen wie \boxtimes, \triangle
\usepackage{pifont} % Dingbats (z.B. \ding, \XSolidBrush)
\usepackage{marvosym} % Zusätzliche Symbole wie \CircledR
\usepackage{wasysym} % Wetter-, Smileys und andere graphische Symbole
% Verzeichnistiefe (aus Makefile TOCDEEP)
\setcounter{tocdepth}{$toc-depth$}
% Fallback-Makros für Pandoc Highlighting
$if(highlighting-macros)$
$highlighting-macros$
$endif$
% Codeblöcke (Pandoc Highlighting)
\usepackage{color}
\usepackage{framed}
\usepackage{fancyvrb}
% Kapitel auf neuer Seite
\newcommand{\sectionbreak}{\clearpage}
\titleformat{\section}{\normalfont\Large\bfseries}{\thesection}{1em}{}
% Titel
\title{
\includegraphics[width=0.3\textwidth]{media/logo/logo.png} \\[2em]
{\Huge $title$} \\
\vspace{1em}
\Large $subtitle$
}
\author{$for(author)$$author$$sep$ \and $endfor$}
\date{
$date$\\
\vspace{1ex}
{\color{gray}\small Buildversion: v$version$ ($buildmode$)}
}
% --- Schriftart für Codeblöcke verkleinern ---
\makeatletter
\def\verbatim@font{\scriptsize\ttfamily}
\makeatother
\begin{document}
% Titelseite OHNE Seitenzahl
\pagestyle{empty}
\maketitle
\thispagestyle{empty}
\clearpage
% Inhaltsverzeichnis OHNE Seitenzahl
\tableofcontents
\clearpage
% Seitenzahlen ab hier: fancy mit Kopf-/Fußzeile
\pagestyle{fancy}
\fancyhf{}
\rhead{$title$}
\lhead{$author$}
\rfoot{\thepage}
\setcounter{page}{1}
$body$
\end{document}