fixed logo handling and added existence checks
This commit is contained in:
@@ -33,7 +33,7 @@ Ein minimales Beispiel:
|
||||
semester = {WS2025/2026},
|
||||
worktype = {Praxisreflektion},
|
||||
submission= {21. Januar 2026}
|
||||
logo = logoort
|
||||
logo = {pfad/zum/logo.bild}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
@@ -79,7 +79,7 @@ Die Klasse nutzt das Key-Value-System (`keyval`) zur komfortablen Einrichtung ze
|
||||
| `program` | Studiengang |
|
||||
| `submission` | Datum der Abgabe. Standard ist das aktuelle Datum mit `\today` |
|
||||
| `headerone`, `headertwo`, `headerthree` | Texte für Kopfzeile von oben nach unten auf der linken Seite|
|
||||
| `logo` | Dateiname des Logos (ohne Endung, z.B. `logo-lfh`) wird rechts oben in der Kopfzeile angezeigt `logo-lfh` ist dabei der Standardort |
|
||||
| `logo` | Dateiname des Logos iklusive Dateiendung und Pfad |
|
||||
|
||||
---
|
||||
|
||||
|
||||
+18
-2
@@ -118,6 +118,21 @@
|
||||
\setlength{\parindent}{0pt} % Absatzeinrückung
|
||||
\setlength{\parskip}{11pt} % Absatzhöhe
|
||||
|
||||
% Helpercommandos
|
||||
% Logo
|
||||
\newcommand{\lfh@includeLogo}{%
|
||||
\ifx\lfh@logo\@empty
|
||||
\ClassInfo{leibnizfh}{No logo file specified. Use \protect\lfhsetup{logo=path/to/file.ext}}%
|
||||
\else
|
||||
\IfFileExists{\lfh@logo}{%
|
||||
\includegraphics[height=3\baselineskip]{\lfh@logo}%
|
||||
}{%
|
||||
\ClassWarning{leibnizfh}{Logo file '\lfh@logo' not found. Header rendered without logo}%
|
||||
}%
|
||||
\fi
|
||||
}
|
||||
|
||||
|
||||
% Fußnote
|
||||
\renewcommand\footnotesize{%
|
||||
\@setfontsize\footnotesize{9pt}{11pt} }
|
||||
@@ -137,7 +152,7 @@
|
||||
\newcommand*\lfh@headerone{Muster}
|
||||
\newcommand*\lfh@headertwo{Haus-\, Seminararbeiten\, Praxisreflexionen\, Essays…}
|
||||
\newcommand*\lfh@headerthree{Leibniz-Fachhochschule $\cdot$ Version 2025}
|
||||
\newcommand*\lfh@logo{logo-lfh}
|
||||
\newcommand*\lfh@logo{}
|
||||
|
||||
\define@key{lfh}{title}{\def\lfh@title{#1}}
|
||||
\define@key{lfh}{subtitle}{\def\lfh@subtitle{#1}}
|
||||
@@ -149,6 +164,7 @@
|
||||
\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}{logo}{\def\lfh@logo{#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}}
|
||||
@@ -172,7 +188,7 @@
|
||||
\textbf{\fontsize{10}{12}\selectfont \lfh@headertwo}\\
|
||||
\fontsize{10}{12}\selectfont \lfh@headerthree
|
||||
}
|
||||
\IfFileExists{\lfh@logo}{\fancyhead[R]{\includegraphics[height=3\baselineskip]{\lfh@logo}}}{}
|
||||
\fancyhead[R]{\lfh@includeLogo}
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0pt}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user