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?

  • 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
    Commented Jul 18, 2014 at 13:48
  • 3
    With XeTeX or LuaTeX you can use every letter in a command name. Not so with normal (pdf)TeX.
    – egreg
    Commented Jul 18, 2014 at 13:48
  • @Sigur: Yes, I thought about that too, or Chinese/Japanese?
    – user31729
    Commented Jul 18, 2014 at 13:49
  • @ChristianHupfer Here's an image of a Russian keyboard: ceratech.co.uk/product_images/language/lrg/…
    – egreg
    Commented Jul 18, 2014 at 13:51
  • 2
    @Sigur A programmer's keyboard will surely have double labels.
    – egreg
    Commented Jul 18, 2014 at 13:54

1 Answer 1


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.

  • Well, I don't want to write command names with cyrillic/czech/slovak/scandinavian letters really, but you answered my question nevertheless.
    – user31729
    Commented Jul 18, 2014 at 15:47
  • I don't know how encTeX works… but would it be easy to set it up with LaTeX/ConTeXt MkII?
    – Manuel
    Commented Jul 18, 2014 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
    Commented Jul 18, 2014 at 18:52

You must log in to answer this question.