From 880284d616522fc4ae8637a56fa444926a887d5a Mon Sep 17 00:00:00 2001 From: KoCoder Date: Fri, 20 Mar 2026 17:11:39 +0100 Subject: [PATCH] Left/Right margins, Logo and Section Name in Heading, Pagenumbering in the footer --- 00-toc.md | 5 +++++ 00_preamble.tex | 18 +++++++++++------- 01-Allgemein.md | 2 ++ _extensions/header/header.tex | 24 ++++++++++++++++++++++++ pandoc-cmd.sh | 10 ++++++---- 5 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 00-toc.md diff --git a/00-toc.md b/00-toc.md new file mode 100644 index 0000000..ecfa863 --- /dev/null +++ b/00-toc.md @@ -0,0 +1,5 @@ +\pagestyle{empty} + +# Inhaltsverzeichnis {-} + +\tableofcontents diff --git a/00_preamble.tex b/00_preamble.tex index 9c2049b..4af7df5 100644 --- a/00_preamble.tex +++ b/00_preamble.tex @@ -11,20 +11,20 @@ \end{minipage} \rule{\textwidth}{0.4pt} - \vspace{2cm} + \vspace{1cm} \begin{center} \includegraphics[width=0.6\textwidth]{images/preamble/logo.png} \\ - \vspace{2cm} + \vspace{1.5cm} \textbf{\Huge DIPLOMARBEIT} \\ \vspace{1cm} \textbf{\huge AlumniHub} \\ \vspace{0.5cm} - \textit{\Large Zentrale Plattform für den Absolventenverein des SZ HTL HAK Ungargasse} + \textit{\Large Plattform für den Absolventenverein des SZ HTL HAK Ungargasse} \end{center} - \vspace{2cm} + \vspace{1.75cm} \begin{minipage}[t]{0.5\textwidth} \textbf{Verfasser:} \\ @@ -37,7 +37,7 @@ Prof. Thomas Gürth \end{minipage} - \vspace{1cm} + \vspace{0.5cm} \begin{minipage}[t]{0.5\textwidth} \textbf{Klasse:} \\ @@ -48,7 +48,7 @@ 2025/26 \end{minipage} - \vspace{1cm} + \vspace{0.75cm} \begin{minipage}[t]{0.5\textwidth} \textbf{Abgabevermerk:} \\ @@ -60,7 +60,7 @@ \hrulefill \end{minipage} - \vspace{0.5cm} + \vspace{0.25cm} \textbf{übernommen von:} \\ \hrulefill @@ -103,9 +103,13 @@ The diploma thesis "AlumniHub" focuses on the development of a central portal fo \newpage \pagenumbering{arabic} +\ \setcounter{page}{1} \makeatletter +\renewcommand{\tableofcontents}{% + \@starttoc{toc}% +} \renewcommand{\listoffigures}{% \@starttoc{lof}% } diff --git a/01-Allgemein.md b/01-Allgemein.md index a4677d5..76719b4 100644 --- a/01-Allgemein.md +++ b/01-Allgemein.md @@ -1,4 +1,6 @@ \cleardoublepage +\pagestyle{fancy} +\pagenumbering{arabic} # Einleitung Allgemeiner Teil diff --git a/_extensions/header/header.tex b/_extensions/header/header.tex index 312476e..a831209 100644 --- a/_extensions/header/header.tex +++ b/_extensions/header/header.tex @@ -6,3 +6,27 @@ \usepackage[hyphens]{url} \usepackage[hidelinks]{hyperref} \setlength{\emergencystretch}{3em} % Prevent overfull lines + +\usepackage{fancyhdr} + +% Define the fancy style but don't activate yet +\fancypagestyle{fancy}{ + \fancyhf{} % clear all header and footer fields + \fancyhead[RO,LE]{\includegraphics[height=1.5cm]{images/preamble/logo.png}} + \fancyhead[LO,RE]{\nouppercase{\leftmark}} + \fancyfoot[RO,LE]{\thepage} + \renewcommand{\headrulewidth}{0.4pt} + \renewcommand{\footrulewidth}{0.4pt} + \newgeometry{top=2.5cm, bottom=2cm, left=3cm, right=2cm, includehead, includefoot} + \setlength{\headheight}{50pt} + \setlength{\footskip}{30pt} +} + +\renewcommand{\sectionmark}[1]{\markboth{#1}{}} % Set section title to \leftmark + +% Default style for preamble/TOC +\pagestyle{plain} +\fancyhf{} +\fancyfoot[C]{\thepage} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} diff --git a/pandoc-cmd.sh b/pandoc-cmd.sh index 6daaae6..ac8a78a 100755 --- a/pandoc-cmd.sh +++ b/pandoc-cmd.sh @@ -1,5 +1,6 @@ #!/bin/bash pandoc \ + 00-toc.md \ 01-Allgemein.md \ 02-Diplomarbeitsbuch-individueller-teil-Adam-Gaiswinkler.md \ 03-Diplomarbeitsbuch-individueller-teil-Florian-Edlmayer.md \ @@ -7,8 +8,6 @@ pandoc \ 97-tabellenverzeichnis.md \ 98-abbildungsverzeichnis.md \ 99-bibliographie.md \ - --toc \ - --toc-depth=3 \ --number-sections \ --lua-filter _extensions/diagram/diagram.lua \ --syntax-definition _extensions/razor/razor.xml \ @@ -16,8 +15,11 @@ pandoc \ --bibliography sources.bib \ --include-before-body 00_preamble.tex \ -H _extensions/header/header.tex \ - -V geometry:margin=2cm \ + -V geometry:"top=2.5cm, bottom=2cm, left=3cm, right=2cm" \ -V toc-title="Inhaltsverzeichnis" \ + -V classoption=twoside \ -V fontsize=12pt \ -V linestretch=1.5 \ - -o diplomarbeitsbuch.pdf \ No newline at end of file + -o diplomarbeitsbuch.pdf + # --toc \ + # --toc-depth=3 \ \ No newline at end of file