<div dir="ltr"><br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
<br>
</div>And what do you want to test?<br>
* argument starts with `t',<br>
* after expansion the first token is `t',<br>
* the argument contains `t',<br>
* ...<br>
The context is important, are assigments allowed or is the<br>
test restricted to expandable contexts?<br>
...<br>
<br></blockquote><br>actually I want to have a group of tokens instead a single token.<br><div><br>To be more specific, this is what I have in mind:<br><br>\newcommand{\setmaindir}[1]{\if#1RTL\pagedir TRT\else \if#1LTR\pagedir TLT\fi\fi}<br>
<br>so that<br><br>\setmaindir{RTL} gives  \pagedir TRT and<br>\setmaindir{LTR} gives \pagedir TLT<br></div></div><br clear="all"><br>-- <br><div dir="ltr">I prefer the most bloodcurdling death to living with humility. The only country I am faithful to, is IRAN. Do not denigrate my last moments...<br>
</div><br>
</div>