0

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?

4
  • Related (maybe duplicate?): tex.stackexchange.com/questions/204541/use-of-lowercase
    – Marijn
    Mar 18, 2020 at 14:45
  • @Marijn it is related but I cannot just sub \lowercase\expandafter\expandafter\expandafter{\csname scr@fromname@var\endcsname} for \csname ...\endcsname. Do I need more \expandafter or is there another way? Mar 19, 2020 at 16:13
  • There is another way, see for example tex.stackexchange.com/questions/173481/…. I tried \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 filename example-image-b, which is a special demo image file that is part of the graphicx package).
    – Marijn
    Mar 19, 2020 at 16:59
  • @Marijn Thanks that works for me! Mar 21, 2020 at 7:36

0

You must log in to answer this question.

Browse other questions tagged .