I have a small problem with a .sty file i'm creating.
I want to have the option to add a logo in the title, which was not problem.
But if I now have a situation where I don't add a logo (either by leaving the input empty or by not heaving the command in the main file) I create a ! Latex error: File `' not found.
The document is still created and looks fine.
Since I want to give the sty. to others I would still like to avoid the appearance of this error...
Here the code snippets i used so far:
%create a placeholder for a logo
\newcommand* {\@titlelogo}{}
\newcommand*{\titlelogo}[1]{\def\@titlelogo{#1}}
And my (unsuccessful) try of avoiding the error:
\ifdefined \titlelogo {\includegraphics[height=1.5cm]{\@titlelogo} }
\else \fi
Maybe there is an elegant solution for optional parameters in for example title pages that I'm simply not aware of.
Thanks a lot and cheers Claudia

\newcommand*{\@titlelogo}{}and use\ifdefined\@titlelogo. – egreg Jul 03 '18 at 13:29