initiale Dateien und Verzeichnisse

This commit is contained in:
br committed 2025-07-31 07:51:46 +02:00
1 parent 4d6dc36ff1
commit e27ebc3c8b
6 files changed
+168 -70

No files matched your search

+6 -2
View File
@@ -2,8 +2,12 @@
---
title: "Mein Projekt"
author: "Björn Runden"
date: "\today{} "
date: \today
fontsize: 10pt
lang: de-DE
toc: false
---
highlight-style: tango
mainfont: lato
...
-9
View File
@@ -1,9 +0,0 @@
# meta.yaml
---
title: "Mein Projekt"
author: "Björn Runden"
date: "\today "
fontsize: 11pt
lang: de-DE
toc: false
---
+144
View File
@@ -0,0 +1,144 @@
% -------------------------------------------------------------------
% PANDOC LATEX-VORLAGE (FINALE VERSION MIT SANS-SERIF & HIGHLIGHTING)
% -------------------------------------------------------------------
\documentclass[$if(fontsize)$$fontsize$$else$11pt$endif$, a4paper]{article}
% --- GRUNDLEGENDE PAKETE ---
\usepackage{geometry}
\geometry{a4paper, top=2.5cm, bottom=2.5cm, left=2.5cm, right=4cm, marginparwidth=2.5cm}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%%\usepackage{fira} % Moderne, serifenlose Schriftart
\renewcommand*\familydefault{\sfdefault} % Serifenlos als Standard setzen
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
% --- FARBENDEFINITONEN ---
\usepackage[dvipsnames]{xcolor}
\definecolor{dunkelblau}{HTML}{003366}
\definecolor{hellgrau}{HTML}{F0F0F0}
\definecolor{sehrhellgrau}{HTML}{F8F8F8}
\definecolor{linkblau}{HTML}{0000FF}
% --- PAKET FÜR BOXEN ---
\usepackage[most]{tcolorbox}
% --- ÜBERSCHRIFTENSTILE DEFINIEREN ---
\usepackage{titlesec}
\newtcolorbox{h1box}{
colback=hellgrau,
colframe=hellgrau,
boxrule=0pt,
sharp corners,
fontupper=\Large\bfseries\color{dunkelblau},
boxsep=0pt, left=5pt, right=5pt, top=4pt, bottom=4pt
}
\newtcolorbox{h2box}{
colback=hellgrau,
colframe=hellgrau,
boxrule=0pt,
sharp corners,
fontupper=\large\bfseries\color{black},
boxsep=0pt, left=5pt, right=5pt, top=3pt, bottom=3pt
}
\titleformat{\section}
{\normalfont}
{}
{0em}
{\begin{h1box}\thesection\quad#1\end{h1box}}
\titleformat{\subsection}
{\normalfont}
{}
{0em}
{\begin{h2box}\thesubsection\quad#1\end{h2box}}
\titleformat{\subsubsection}
{\normalsize\bfseries\color{black}}
{\thesubsubsection}
{1em}
{#1}
\titleformat{\paragraph}
{\small\bfseries\color{black}}
{\theparagraph}
{1em}
{#1}
\titlespacing*{\section}{0pt}{2ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subsection}{0pt}{2ex plus 1ex minus .2ex}{1ex plus .2ex}
\titlespacing*{\subsubsection}{0pt}{1.5ex plus 1ex minus .2ex}{0.5ex plus .2ex}
% --- RANDNOTIZEN ---
\let\marginpar\marginpar
% --- CODE-BLÖCKE & BLOCKZITATE ---
% Robuste Definition für Pandoc's Code-Block-Umgebung
\let\Shaded\undefined
\let\endShaded\undefined
\newenvironment{Shaded}{
\begin{tcolorbox}[
colback=sehrhellgrau,
colframe=sehrhellgrau,
sharp corners,
boxrule=0pt,
top=8pt,
bottom=8pt,
left=8pt,
right=8pt
]
}{\end{tcolorbox}}
% Für Standard-Blockzitate
\renewenvironment{quote}{
\begin{tcolorbox}[
colback=sehrhellgrau,
colframe=sehrhellgrau,
sharp corners,
boxrule=0pt,
top=8pt,
bottom=8pt,
left=8pt,
right=8pt,
fontupper=\itshape, % Zitate kursiv statt monospace
]
}{\end{tcolorbox}}
% --- HYPERLINKS ---
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=dunkelblau,
urlcolor=dunkelblau,
citecolor=dunkelblau
}
% --- PANDOC VARIABLEN ---
$if(title)$
\title{$title$}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$; $endfor$}
$endif$
$if(date)$
\date{$date$}
$endif$
\begin{document}
$if(title)$
\maketitle
$endif$
$if(toc)$
\tableofcontents
\newpage
$endif$
$body$
\end{document}
Regular → Executable
+17 -23
View File
@@ -1,37 +1,31 @@
#!/bin/bash
# --- KONFIGURATION ---
# Name des Projektes
#PROJECT="hauptdok"
PROJECT="testdok"
OUTPUT_DIR="../pdf"
# Erstelle das PDF-Verzeichnis, falls es nicht existiert
mkdir -p "$OUTPUT_DIR"
# Name der finalen PDF-Datei
OUTPUT_FILE="../pdf/$PROJECT.pdf"
# Name des Headerfile
HEADER_FILE="./inc/header.md"
# Name der LaTeX-Vorlage
TEMPLATE="./inc/vorlage.tex"
# Liste der Markdown-Dateien in der richtigen Reihenfolge
# Die erste Datei sollte die Metadaten (YAML-Block) enthalten.
# --- EINGABEDATEIEN ---
METADATA_FILE="./inc/header.md"
TEMPLATE_FILE="./inc/vorlage.tex"
# Liste der Markdown-Inhaltsdateien (OHNE Metadaten-Datei)
INPUT_FILES=(
"${HEADER_FILE}"
"./${PROJECT}.md"
# "kapitel1.md"
# "kapitel2.md"
# Füge hier weitere .md-Dateien hinzu
# "kapitel1.md"
# "kapitel2.md"
)
# --- SKRIPT ---
# Setzt das Skript auf "Fail-Fast": Bricht bei einem Fehler sofort ab.
set -e
set -e # Bricht bei einem Fehler sofort ab.
echo "🚀 Starte PDF-Kompilierung..."
echo "🚀 Starte PDF-Kompilierung für '$PROJECT.md'..."
# Pandoc-Befehl ausführen
pandoc "${INPUT_FILES[@]}" \
-o "$OUTPUT_FILE" \
--template="$TEMPLATE" \
--pdf-engine=xelatex
--metadata-file="$METADATA_FILE" \
--template="$TEMPLATE_FILE" \
--pdf-engine=xelatex \
-o "$OUTPUT_DIR/$PROJECT.pdf"
### --highlight-style=pygments \
echo "✅ Fertig! PDF wurde als '$OUTPUT_FILE' erstellt."
echo "✅ Fertig! PDF wurde als '$OUTPUT_DIR/$PROJECT.pdf' erstellt."
-36
View File
@@ -1,36 +0,0 @@
#!/bin/bash
# --- KONFIGURATION ---
# Name des Projektes
PROJECT="hauptdok"
# Name der finalen PDF-Datei
OUTPUT_FILE="../pdf/$PROJECT.pdf"
# Name des Headerfile
HEADER_FILE="./inc/header.md"
# Name der LaTeX-Vorlage
TEMPLATE="./inc/vorlage.tex"
# Liste der Markdown-Dateien in der richtigen Reihenfolge
# Die erste Datei sollte die Metadaten (YAML-Block) enthalten.
INPUT_FILES=(
"${HEADER_FILE}"
"./${PROJECT}.md"
# "kapitel1.md"
# "kapitel2.md"
# Füge hier weitere .md-Dateien hinzu
)
# --- SKRIPT ---
# Setzt das Skript auf "Fail-Fast": Bricht bei einem Fehler sofort ab.
set -e
echo "🚀 Starte PDF-Kompilierung..."
# Pandoc-Befehl ausführen
pandoc "${INPUT_FILES[@]}" \
-o "$OUTPUT_FILE" \
--template="$TEMPLATE" \
--pdf-engine=xelatex
echo "✅ Fertig! PDF wurde als '$OUTPUT_FILE' erstellt."