I have some troubles by comparing strings in my beamer theme.

I would like to compare the "techno" argument with a string (iOS, Android, Java,...):

if techno =="iOS" logo_path = "some_image" else if techno == "android" logo_path = "some_other_image"

and so on,

I take an argument from the main .tex files and I would like to compare it do define an image to include :




Then I include a graphics :


When I compile it tolds me : image `ios' (back quote + value + quote) is not found.

I have to declare a macro to solve the problem :


Do someone have some explanations?

  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem (see some instructions here). It will be much easier to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – e-birk
    Mar 22, 2013 at 17:35
  • 1
    Why is there a \def inside \IfStrEq{\def\beamer@ALE@Techno}{\def\beamer@ALE@iOSLogo}...? If you want to get the value of \beamer@ALE@Techno it should not be there...
    – e-birk
    Mar 22, 2013 at 17:38
  • Furthermore, by default you cannot (and should not) use @ in macros name in the normal text, e.g. see tex.stackexchange.com/questions/6240/…. Due to a missing MWE it is more difficult to say, but it might be the problem...
    – e-birk
    Mar 22, 2013 at 17:50
  • 1
    The question has been edited but it still has nowhere near enough information to guess what the question is. Pleas make a mininimal working example as requested in the first comment. (however I'll put another guess in my answer) Mar 27, 2013 at 9:36

1 Answer 1


It is hard to guess from the code fragment which strings you want to compare but I think you want to compare \beamer@ALE@Techno (The option value) with \beamer@ALE@iOSLogo which you can do with

   ... ios case
  ... other case

Your question has


It is hard to guess what the intention of that is as \IfStrEq is intended to compare strings (lists of characters) but you have passed it a definition.

However I don't think you nwant to do a compare at all, just define


\DeclareOptionBeamer{techno}{\csname tech-image-#1\endcsname}}


then it will include an image mydefaultimage unlesss techno=ios or techno=android in which case you get teh specified files, more \@namedef could be added as required.

  • Okay, I edited my first message to give more informations.
    – YaGeek
    Mar 27, 2013 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.