I'm preparing to make a small package for typesetting math textbooks in Russian, under Windows (MikTeX distribution). What input encoding should I prefer? I've always been using cp1251, but as I learned after exploring this incredible site, using utf-8 will allow authors to use some nice fonts. What else can get with utf-8?

  • Interoperability: If you expect that the package (is it something that will be loaded in a document via \usepackage?) will be used by others, I don't think it makes sense to use cp1251 as it is too specific. – jon Jan 2 '14 at 18:07
  • utf8 allows you to use non-latin languages (perhaps you loaded already some fonts packages to support Russian but utf8 allows someone to use asian (for example) chararcters.) – ppr Jan 2 '14 at 18:09
  • 1
    Compare being having at most 256 glyphs to having thousands of them at your disposal. – egreg Jan 2 '14 at 18:27

Since UTF8 is the only input encoding that Lua(La)TeX can handle natively (i.e., without loading the luainputenc package), it's essential to use UTF8 if you are contemplating using this more recent TeX engine/format to its best effect.

Note that while it's possible to use other input encoding schemes under LuaLaTeX by loading the luainputenc package, doing so -- according to the package's user guide -- "basically turns LuaTeX into an 8-bit engine, which means you loose half the benefits from using LuaTeX". (The situation is less bad if you use only Unicode fonts, in which case you should load the package with the option unactivate.)

  • XeTeX can handle many other input encoding, and LuaTeX can be made to do so as well (e.g. with the luainputenc package). – Khaled Hosny Jan 2 '14 at 23:49
  • @KhaledHosny - Thanks for this observation. I've dropped the XeTeX part and added a discussion of how the luainputenc package might be used. – Mico Jan 3 '14 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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