Initial commit

This commit is contained in:
chhof 2025-05-01 20:58:29 +02:00
commit f1bc268c04
4 changed files with 264 additions and 0 deletions

View file

@ -0,0 +1,32 @@
name: Compile LaTeX
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: docker
container: texlive/texlive
steps:
- name: Checkout repository
run: |
git clone "$(echo "$GITHUB_SERVER_URL" | sed -E "s#(https?://)#\1${FORGEJO_TOKEN}@#")/${GITHUB_REPOSITORY}.git" .
- name: Compile LaTeX document
run: |
TMP="$RUNNER_TEMP/output"
cd Aufgabe
latexmk -pdf -interaction=nonstopmode -output-directory="$TMP" main.tex
mv "$TMP/main.pdf" Aufgabe.pdf
- name: Commit PDF back to repo
run: |
git config --global user.name "Forgejo Runner"
git config --global user.email "runner@localhost"
git add .
git commit -m "Automated PDF build"
git push origin "$GITHUB_REF_NAME"

BIN
Aufgabe/Aufgabe.pdf Normal file

Binary file not shown.

222
Aufgabe/header.sty Normal file
View file

@ -0,0 +1,222 @@
\documentclass[a4paper,12pt<]{article}
\usepackage{comment}
\delimitershortfall=-2pt
\delimiterfactor=900
\usepackage{sansmath, amstext, mathtools, physics}
\usepackage{ifthen}
\usepackage{wrapfig}
% Frakturschrift
\usepackage{yfonts}
\usepackage{attachfile2}
\usepackage{enumitem}
\setlist[itemize] {itemsep=0.0em, topsep=0.0em}
\setlist[enumerate]{itemsep=0.0em, topsep=0.0em}
% Deutsche Sprache, Silbentrennung und Schriftzeichen
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\hypersetup{hidelinks}
% Verbesserter Wortabstand
\usepackage{microtype}
\usepackage{hyphenat}
\usepackage{multicol}
\usepackage{needspace}
\usepackage{physics}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{dsfont}
\usepackage{amssymb}
%\usepackage{mleftright}
% displaystyle in '\( ... \)' inline
\let\oldlparen\(
\let\oldrparen\)
\renewcommand{\(}{\oldlparen\displaystyle}
\renewcommand{\)}{\oldrparen}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\usepackage{tikz}
\usepackage{pgfmath}
\usepgfplotslibrary{colormaps} % For better shading
\pgfplotsset{compat=newest}
\usepgfplotslibrary{colormaps}
\usetikzlibrary{3d}
% Pakete für Layout und Schriftart
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{helvet} % Helvetica-Schriftart
\renewcommand{\familydefault}{\sfdefault} % Setze serifenlose Schriftart global
% Layout
\usepackage[margin=1cm, tmargin=2cm, bmargin=0.5cm]{geometry} % Linker und rechter Rand = 1cm
\setlength{\parindent}{0pt} % Kein Einschub am Anfang eines Paragraphen
\setlength{\parskip}{1em} % Abstand zwischen Paragraphen = 1em
% Aufgabe-Environment
\usepackage{titlesec}
% Define a counter for the 'aufgabe' environment, reset with each section
\newcounter{aufgabencounter}[section]
\renewcommand{\theaufgabencounter}{\thesection.\arabic{aufgabencounter}}
% Headerfancy
\usepackage{fancyhdr} % For custom headers
\usepackage{needspace} % To prevent page breaks in the middle of tasks
\usepackage{titlesec} % For controlling section title format
% Variable to store current task title
\newcommand{\currenttasktitle}{}
% Setup the header with fancyhdr
\pagestyle{fancy}
%%%\fancyhf{}
\fancyhead[L]{\scriptsize\leftmark\\\currenttasktitle}
\fancyhead[R]{\Large\thepage}
%\fancyhf{} % Alle Kopf- und Fußzeilen leeren
\fancyfoot[C]{} % Fußzeile in der Mitte leeren
% Define the 'aufgabe' environment
\newenvironment{aufgabe}[1]{%
%%%%<- pagebreak wenn Restseite < x %
\ifdim\pagetotal>\dimexpr0.75\textheight\relax
\clearpage
\fi
%%%%->
\refstepcounter{aufgabencounter}
\renewcommand{\currenttasktitle}{A-\theaufgabencounter\ (#1)}
\addcontentsline{toc}{subsection}{A-\theaufgabencounter: #1}
% \needspace{10\baselineskip}
\begin{mdframed}
\underline{\textbf{Aufgabe \theaufgabencounter\ (#1)}}
%%%%<-
\ignorespaces
%%%%->
}{\end{mdframed}%
%%%%<-
\ignorespacesafterend
%%%%->
}
% Umdefinitionen
\renewcommand{\vec}{\underline}
% Frames
\usepackage[framemethod=Tikz]{mdframed}
\mdfsetup{
linecolor=black,
linewidth=1.5pt,
roundcorner=6pt,
backgroundcolor=white,
% tikzsetting={rounded corners}, % TikZ Einstellung für abgerundete Ecken
}
\begin{comment}
\mdfsetup{
linecolor=black,
linewidth=1.5pt,
roundcorner=15pt,
innertopmargin=10pt,
innerbottommargin=10pt,
leftmargin=0pt,
rightmargin=0pt,
backgroundcolor=white
}
\end{comment}
\newcommand{\ul}[1]{\underline{#1}}
% Quantenmechanik
\usepackage{quantikz}
\usepackage{braket}
%\newcommand{\ketbra}[2]{\Ket{#1}\!\!\Bra{#2}}
\newcommand{\tikzmark}[2]{
\tikz[overlay,remember picture, baseline=(#1.base)]{
\node (#1) {#2};
}
}
\usepackage{listings}
\allowdisplaybreaks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tocloft}
\renewcommand{\cftsecdotsep}{1}
\renewcommand{\cftsubsecdotsep}{1}
\begin{comment}
\newlistof%
{attachedfiles}%
{atf}%
{Liste der Programmcodes}
\newcommand{\textattachfilewithentry}[3]{
\textattachfile{#1}{#2}
\addcontentsline
{atf} {attachedfile}
{\\ \protect\numberline{[Kap.~\thesection] #3 \dots\dots \thepage} }
}
\end{comment}
\newlistof%
{attachedfiles}%
{atf}%
{Liste der Programmcodes}
\newcommand{\textattachfilewithentry}[3]{ %
\textattachfile{#1}{#2}%
\addcontentsline %
{atf} {attachedfile} %
{\\ \protect\textattachfile{#1}{\textcolor{black}{\fbox{CODE}}}
[Kap.~\thesection] #3 \dots\dots } %
%
% \addtocontents
% {mylist}
% {
% \protect\contentsline{mylist}{}
% {#3 \protect\attachfilelink{#2}{(Download)}}
% {}
% }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

10
Aufgabe/main.tex Normal file
View file

@ -0,0 +1,10 @@
\input{header.sty}
\begin{document}
\begin{aufgabe}{Hier den Aufgabentitel eintragen}
{\bf Lösung}
\end{aufgabe}
\end{document}