<div dir="ltr">2017-04-16 10:08 GMT+02:00 Julian Bradfield <span dir="ltr"><<a href="mailto:jcb+xetex@jcbradfield.org" target="_blank">jcb+xetex@jcbradfield.org</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 2017-04-15, Bruno Le Floch <<a href="mailto:blflatex@gmail.com">blflatex@gmail.com</a>> wrote:<br>
> The primitive conditional "\ifcat\relax\cr true\else false\fi" gives<br>
> "true" in pdfTeX, LuaTeX, (e)(u)pTeX, and XeTeX from some time ago<br>
> (could be years), but "false" in XeTeX 0.99996<br>
<br>
</span>Definitely a bug. The TeXbook defines the behaviour of \if and \ifcat,<br>
and all control sequences are considered to have character code 256<br>
and category code 16, unless \let equal to a non-active character, in<br>
which case they have the value of that character.<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div>Not all control sequences but primitives. Unlike \ifx, \if and \ifcat perform full expansion.<br></div><div>Try the following code:<br><br></div><div>\def\a{$A$}<br></div><div>\def\b{hello}<br></div><div>\def\c{world}<br></div><div>\ifcat\a\b\else\c\fi<br><br></div><div>The output will be world because $ and A have different category codes.<br><br></div><div>Similarly, \ifcat\relax\a will compare \relax with $. <br></div><div><br><br clear="all"><div><div class="gmail_signature">Zdeněk Wagner<br><a href="http://ttsm.icpf.cas.cz/team/wagner.shtml" target="_blank">http://ttsm.icpf.cas.cz/team/wagner.shtml</a><br><a href="http://icebearsoft.euweb.cz" target="_blank">http://icebearsoft.euweb.cz</a></div></div>
<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
<br>
------------------------------<wbr>--------------------<br>
Subscriptions, Archive, and List information, etc.:<br>
  <a href="http://tug.org/mailman/listinfo/xetex" rel="noreferrer" target="_blank">http://tug.org/mailman/<wbr>listinfo/xetex</a><br>
</div></div></blockquote></div><br></div></div>