![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
17 Sep
2015
17 Sep
'15
11:26 a.m.
Pablo Rodriguez mailto:oinos@gmx.es 17. September 2015 18:47 Dear list,
I have the following sample:
\startluacode function document.gouppercase(str) tex.print(str:upper()) end \stopluacode
\unexpanded\def\MyUpper#1% {\ctxlua{document.gouppercase("#1")}}
\starttext \doif{\MyUpper{adfalkjfaeñf}}{\MyUpper{aDFAlkjfaeñf}}{equal}{unequal}
\ctxlua{if string.upper("adfalkjfaeñf") == string.upper("aDFAlkjfaeñf") then tex.print("equal") else tex.print("unequal") end} \stoptext
Why are are the first two strings unequal? You can’t use a unexpandable (which you created with \unexpanded) in ConTeXts \doifXXX commands.
PS. You need \doifelse and not \doif. Wolfgang