fixed logo handling and added existence checks

This commit is contained in:
HXF1302
2026-05-08 13:56:22 +02:00
parent 783fcd03c7
commit fc8e756e83
2 changed files with 20 additions and 4 deletions
+18 -2
View File
@@ -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}
}