TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a replacement for the \Unicode macro from CJK. It takes two decimal numbers as arguments and inserts #1*256 + #2 into the token stream (or something like that; it's a way to write Unicode characters by code like A in XML).

That should be possible with a tiny bit of lua code. Any pointers?

share|improve this question
Would \char\numexpr#1*256+#2\relax suffice? – egreg May 16 '11 at 20:35
That seems to work, too. Please create an answer so that I can accept this. – Aaron Digulla May 16 '11 at 21:19
up vote 4 down vote accepted

As far as I can tell, a definition such as


should be what you need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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