Files
leibnizfh-tex/leibnizfh.cls
T
2026-01-22 01:49:22 +00:00

202 lines
5.9 KiB
OpenEdge ABL

% -----------------------------------------------------------------------------
% LeibnizFH LaTeX-Klasse v1.0.0
% Erstellt von: F. L. Werner
% Datum: 27.01.2026
%
% Beschreibung:
% Erstellt nach den Hochschulvorgaben (s. Datum). Angaben ohne Gewähr.
% Beiträge und Verbesserungen sind willkommen - viel Spaß beim Nutzen!
%
% Repository / Versionierung: http://gitea.wernerslab.work/hxf1302/leibnizfh-tex
%
%% leibnizfh.cls
%% Copyright 2026 F. L. Werner
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is F. L. Werner.
%
% This work consists of the file leibnizfh.cls
% -----------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{leibnizfh}[2026/01/21 v1.0.0 Leibniz FH Dokumentenklasse]
% Eigene Klassenoptionen:
\newif\if@ngerman
\newif\if@english
\newif\iflfh@plaintitle
\@ngermantrue
\DeclareOption{plaintitle}{%
\lfh@plaintitletrue
}
\DeclareOption{ngerman}{%
\@ngermantrue
\@englishfalse
}
\DeclareOption{english}{%
\@englishtrue
\@ngermanfalse
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
% Standardklasse laden
\LoadClass[a4paper,11pt]{article}
% Pakete laden
% Standardformat
\RequirePackage[left=4cm, right=2cm, top=2.5cm, bottom=2.5cm]{geometry} % Abstände
\RequirePackage{helvet} % Helvetika (Serifenlose Schrift)
\RequirePackage{setspace} % Zeilenabstände
\RequirePackage{microtype} % Bessere Typographie im Blocksatz
% Headerzusätze
\RequirePackage{fancyhdr}
\RequirePackage{hyperref}
\RequirePackage{graphicx}
% Konfiguration per Key->Value
\RequirePackage{keyval}
% Sprache
\if@ngerman
\RequirePackage[ngerman]{babel}
\else
\RequirePackage[english]{babel}
\fi
% Formatgrundlagen
\renewcommand{\familydefault}{\sfdefault} % Font
\onehalfspacing %Zeilenabstand
\setlength{\parindent}{0pt} % Absatzeinrückung
\setlength{\parskip}{11pt} % Absatzhöhe
% Fußnote
\makeatletter
\renewcommand\footnotesize{%
\@setfontsize\footnotesize{9pt}{11pt} }
\makeatother
% Konfiguration
\makeatletter
\newcommand*\lfh@title{Thema (Schrift groß oder fett)}
\newcommand*\lfh@module{Nennung des Moduls}
\newcommand*\lfh@semester{Semesterangabe\, z. B. „WS2025/2026“}
\newcommand*\lfh@worktype{Leistungsnachweis/Hausarbeit Praxisreflexion/Projektarbeit/Seminararbeit/ }
\newcommand*\lfh@author{Vorname Nachname}
\newcommand*\lfh@studentid{XXXXXX}
\newcommand*\lfh@email{e-mail@addresse.invalid}
\newcommand*\lfh@prof{Name des Professors/in}
\newcommand*\lfh@program{Studiengang}
\newcommand*\lfh@submission{\today}
\newcommand*\lfh@headerone{Muster}
\newcommand*\lfh@headertwo{Haus-\, Seminararbeiten\, Praxisreflexionen\, Essays…}
\newcommand*\lfh@headerthree{Leibniz-Fachhochschule $\cdot$ Version 2025}
\newcommand*\lfh@logo{logo-lfh}
\define@key{lfh}{title}{\def\lfh@title{#1}}
\define@key{lfh}{module}{\def\lfh@module{#1}}
\define@key{lfh}{semester}{\def\lfh@semester{#1}}
\define@key{lfh}{worktype}{\def\lfh@worktype{#1}}
\define@key{lfh}{author}{\def\lfh@author{#1}}
\define@key{lfh}{studentid}{\def\lfh@studentid{#1}}
\define@key{lfh}{email}{\def\lfh@email{#1}}
\define@key{lfh}{prof}{\def\lfh@prof{#1}}
\define@key{lfh}{program}{\def\lfh@program{#1}}
\define@key{lfh}{submission}{\def\lfh@submission{#1}}
\define@key{lfh}{headerone}{\def\lfh@headerone{#1}}
\define@key{lfh}{headertwo}{\def\lfh@headertwo{#1}}
\define@key{lfh}{headerthree}{\def\lfh@headerthree{#1}}
\define@key{lfh}{logo}{\def\lfh@logo{#1}}
\newcommand{\lfhsetup}[1]{\setkeys{lfh}{#1}}
\makeatother
% Header
\makeatletter
% Globale Header-Höhen
\setlength{\headheight}{36pt}
\setlength{\footskip}{25pt}
% lfhheader
\fancypagestyle{lfhheader}{%
\fancyhf{}
\fancyhead[L]{%
\textbf{\fontsize{10}{12}\selectfont \lfh@headerone}\\
\textbf{\fontsize{10}{12}\selectfont \lfh@headertwo}\\
\fontsize{10}{12}\selectfont \lfh@headerthree
}
\fancyhead[R]{\includegraphics[height=3\baselineskip]{\lfh@logo}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
}
% lfhplain
\fancypagestyle{lfhplain}{%
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
% lfhpage
\fancypagestyle{lfhpage}{%
\fancyhf{}
\fancyfoot[C]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
% makelfhtitle
\newcommand*{\makelfhtitle}{%
\newgeometry{left=3cm,right=2cm,top=3cm,bottom=1cm}
\begin{titlepage}
\iflfh@plaintitle
\thispagestyle{lfhplain} % ← Plain ohne Header
\else
\thispagestyle{lfhheader} % ← Standard MIT Header
\fi
\vspace{2cm}
\begin{flushleft}
\fontsize{11.5}{12}\selectfont Leibniz-Fachhochschule\\[0.5em]
\fontsize{11.5}{12}\selectfont \lfh@program\\[0.5em]
\fontsize{11.5}{12}\selectfont Betreut durch: \lfh@prof
\end{flushleft}
\vspace{2cm}
\begin{center}
\fontsize{11.5}{12}\selectfont \lfh@worktype\\[0.5em]
\fontsize{11.5}{12}\selectfont im Fach \lfh@module\ im \lfh@semester
\end{center}
\vspace{1.8cm}
\begin{center}
{\Huge\bfseries \lfh@title}
\end{center}
\vfill
\begin{flushleft}
\fontsize{11.5}{12}\selectfont \lfh@author\\[0.8em]
\fontsize{11.5}{12}\selectfont Matr.-Nr.: \lfh@studentid\\[0.8em]
\fontsize{11.5}{12}\selectfont E-Mail: \href{mailto:\lfh@email}{\lfh@email}\\[1em]
\fontsize{11.5}{12}\selectfont Abgabedatum: \lfh@submission
\end{flushleft}
\end{titlepage}
\restoregeometry
}
\makeatother