[XeTeX] Active characters

John Was john.was at ntlworld.com
Sun Dec 23 17:16:37 CET 2007


Michael Trausch recently asked about accessing a separate font for just a few characters missing from the main font that he wanted to use.  The answer that JK gave was to make the character active so that it could become a single-character macro.  I seem to have misunderstood the syntax, so would be grateful for some help.

I want to make < and > go to another font and access the obtuse-angled tall brackets (Unicode values 3008 and 3009) rather than the mathematical less-than and greater-than signs (values 003C and 003E), but I find that having made < and > active and defining them as e.g. {{\altfont \char"3008}} and {{\altfont \char"3009}} (the two pairs of {} being necessary, of course, so that subsequent text is not given in the wrong font) I have to give {\<} and {\>} rather than just < and > to produce the desired result.  This isn't a great burden and can easily be taken care of by global search-and-replace, but I'd like to know what the trick is that I'm missing.  JK's answer (referring to a different character) was:

\catcode"2191 = \active

But I find that XeTeX halts at \def^^^^, which it can't understand.

Should there be some preceding code that makes \def^^^^ comprehensible to XeTeX?

Many thanks in advance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20071223/f2892882/attachment.html 

More information about the XeTeX mailing list