initiale Dateien und Verzeichnisse
This commit is contained in:
1 parent
4d6dc36ff1
commit
e27ebc3c8b
6 files changed
+166
-68
No files matched your search
@@ -1 +1,2 @@
|
|||||||
pdf
|
pdf
|
||||||
|
*~
|
||||||
@@ -2,8 +2,12 @@
|
|||||||
---
|
---
|
||||||
title: "Mein Projekt"
|
title: "Mein Projekt"
|
||||||
author: "Björn Runden"
|
author: "Björn Runden"
|
||||||
date: "\today{} "
|
date: \today
|
||||||
fontsize: 10pt
|
fontsize: 10pt
|
||||||
lang: de-DE
|
lang: de-DE
|
||||||
toc: false
|
toc: false
|
||||||
---
|
highlight-style: tango
|
||||||
|
mainfont: lato
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# meta.yaml
|
|
||||||
---
|
|
||||||
title: "Mein Projekt"
|
|
||||||
author: "Björn Runden"
|
|
||||||
date: "\today "
|
|
||||||
fontsize: 11pt
|
|
||||||
lang: de-DE
|
|
||||||
toc: false
|
|
||||||
---
|
|
||||||
@@ -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
+15
-21
@@ -1,37 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# --- KONFIGURATION ---
|
# --- KONFIGURATION ---
|
||||||
# Name des Projektes
|
|
||||||
#PROJECT="hauptdok"
|
|
||||||
PROJECT="testdok"
|
PROJECT="testdok"
|
||||||
|
OUTPUT_DIR="../pdf"
|
||||||
|
# Erstelle das PDF-Verzeichnis, falls es nicht existiert
|
||||||
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
|
||||||
# Name der finalen PDF-Datei
|
# --- EINGABEDATEIEN ---
|
||||||
OUTPUT_FILE="../pdf/$PROJECT.pdf"
|
METADATA_FILE="./inc/header.md"
|
||||||
# Name des Headerfile
|
TEMPLATE_FILE="./inc/vorlage.tex"
|
||||||
HEADER_FILE="./inc/header.md"
|
# Liste der Markdown-Inhaltsdateien (OHNE Metadaten-Datei)
|
||||||
# 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=(
|
INPUT_FILES=(
|
||||||
"${HEADER_FILE}"
|
|
||||||
"./${PROJECT}.md"
|
"./${PROJECT}.md"
|
||||||
# "kapitel1.md"
|
# "kapitel1.md"
|
||||||
# "kapitel2.md"
|
# "kapitel2.md"
|
||||||
# Füge hier weitere .md-Dateien hinzu
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# --- SKRIPT ---
|
# --- SKRIPT ---
|
||||||
# Setzt das Skript auf "Fail-Fast": Bricht bei einem Fehler sofort ab.
|
set -e # Bricht bei einem Fehler sofort ab.
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "🚀 Starte PDF-Kompilierung..."
|
echo "🚀 Starte PDF-Kompilierung für '$PROJECT.md'..."
|
||||||
|
|
||||||
# Pandoc-Befehl ausführen
|
|
||||||
pandoc "${INPUT_FILES[@]}" \
|
pandoc "${INPUT_FILES[@]}" \
|
||||||
-o "$OUTPUT_FILE" \
|
--metadata-file="$METADATA_FILE" \
|
||||||
--template="$TEMPLATE" \
|
--template="$TEMPLATE_FILE" \
|
||||||
--pdf-engine=xelatex
|
--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."
|
||||||
@@ -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."
|
|
||||||
Reference in new issue
Block a user