TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

Perhaps this question has been asked already, but my search efforts were unsuccessful.

Is it necessary to have ASCII characters (i.e. letters basically [a..z,A..Z], special characters such as \( etc are not important for this question) for a macro name or is it possible to say, e.g. with cyrillic letters

or with any other alphabet not being the (western) Latin Alphabet?

This is somehow connected to input encoding, but on the other hand it is not connected to it, since I am not interested what (La)TeX generates of ordinary words entered in another alphabet/encoding, say я не понимаю, generating the corresponding output using the correct font.

How's the situation with LaTeX 3, or ConTeXt, Xe/LuaLaTeX?

share|improve this question
I always think about: how Russian users type in TeX using Russian keyboard? They have to change the keyboard layout and remember the position of keys!? – Sigur Jul 18 '14 at 13:48
With XeTeX or LuaTeX you can use every letter in a command name. Not so with normal (pdf)TeX. – egreg Jul 18 '14 at 13:48
@Sigur: Yes, I thought about that too, or Chinese/Japanese? – Christian Hupfer Jul 18 '14 at 13:49
@ChristianHupfer Here's an image of a Russian keyboard: ceratech.co.uk/product_images/language/lrg/… – egreg Jul 18 '14 at 13:51
@Sigur A programmer's keyboard will surely have double labels. – egreg Jul 18 '14 at 13:54
up vote 9 down vote accepted

There are 256 internal codes in classical TeX and pdfTeX and you can set arbitrary subset of them as letters (catcode 11). Then such characters can be used in control sequences.

There are many thousands of internal codes (from Unicode) possible in LuaTeX and XeTeX. If you set (for example) cyrillic as letters then you can use them in control sequences.

The csplain, for example, sets all letters from Cech and Slovak alphabet as letters, so there are possible \podezřelésekvence. The UTF-8 input of Czech and Slovak alphabet is converted to internal codes by encTeX when csplain uses pdfTeX. Because encTeX does its conversion before token processor, all Czech and Slovak letters are treated as single tokens with catcode 11 and they can be used in control sequences.

It is possible to do some similar with cyrillic letters but the number of internal codes in pdfTeX is limited to 256.

When csplain or another macro engines use XeTeX or LuaTeX then there is no problem. The UTF-8 codes are converted to the internal codes naturally.

share|improve this answer
Well, I don't want to write command names with cyrillic/czech/slovak/scandinavian letters really, but you answered my question nevertheless. – Christian Hupfer Jul 18 '14 at 15:47
I don't know how encTeX works… but would it be easy to set it up with LaTeX/ConTeXt MkII? – Manuel Jul 18 '14 at 16:58
encTeX is a little extension of pdfTeX activated by -enc option when format is generated. It is able to convert multi bytes (i.e UTF-8 codes) to single byte or to control sequence (to one token in both cases) before token processor. It converts these tokens back to multi bytes during \write. I know only one LaTeX user who used encTeX rather than inputenc.sty (this .sty performs re-encoding at expand processor level thus brings problems). I was noticed that Hans Hagen did some experiments with encTeX in old days of Context but now he is using only LuaTeX where encTeX gives no sense. – wipet Jul 18 '14 at 18:52

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.