I have the following code that works fine, but would like to make it to lowercase which I have not quiet accomplished yet
\documentclass{scrlttr2}
\usepackage{graphicx}
\setkomavar{fromname}{t}
\def\mylogo{class_\csname scr@fromname@var\endcsname}
\begin{document}
\includegraphics{\mylogo}
\end{document}
Any ideas on how I could make sure that whatever is in the komavar is in lowercase?
\lowercase\expandafter\expandafter\expandafter{\csname scr@fromname@var\endcsname}
for\csname ...\endcsname
. Do I need more\expandafter
or is there another way?\setkomavar{fromname}{B}\usepackage{stringstrings}\caselower[q]{\csname scr@fromname@var\endcsname}\def\mylogolc{example-image-\thestring}
and that works for your code as well (generating the filenameexample-image-b
, which is a special demo image file that is part of thegraphicx
package).