1

I have lots of macros and so would like to create a format out of them. I am using xetex as engine. Suppose format.ini is a file which looks like this:

\input plain

[lots of macros]

\dump 

If from the terminal I execute xetex -ini format.ini I get as error Undefined control sequence \uselanguage. The command \uselanguage is part of the macros after \input plain. I think \uselanguage is part of the etex extension. But I get the same error even if I type on the terminal xetex -ini -etex format.ini.

What should I do?

  • I think you should \input etex.src – egreg Dec 31 '15 at 15:09
  • Try xetex -ini "*format.ini" This should include the etex - extensions automatically – user31729 Dec 31 '15 at 15:13
  • @egreg I changed for simplicity the file format.ini to \input etex.src \dump. If I try pdftex -ini -etex format.ini all go well; but with xetex -ini -etex format.ini I get as error UTF-8 Latvian hyphenation patterns (/usr/share/texlive/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-lv.tex ! Nonletter. l.16 d4ž – User Dec 31 '15 at 15:23
  • @ChristianHupfer Also your method works with pdftex but not with xetex – User Dec 31 '15 at 15:24
  • @User: Well, I compiled a small document here with xetex but I don't have your document at hand, of course – user31729 Dec 31 '15 at 15:28
2

etex.src loads babel's kernel via bplain, which includes the \uselanguage macro that was missing in the OP; but then, bplain calls language.def (not hyphen.cfg, as in LaTeX), which in your installation probably includes all the hyphenation patterns for languages that you don't actually use, like the latvian one. You should edit language.def to load only the hyphenation patterns that you need, and then create the format as specified in the comments: xetex -ini -etex etex.src \dump

  • Thank you, I will check your solution and then come back eventually accepting it. But why, for example, the latvian hyphenation does not compile? Why does it work with pdftex and not with xetex? – User Jan 4 '16 at 21:28
  • 1
    perhaps it is the encoding: if the latvian is in 8bit it should work in pdftex, but then it may be an invalid utf8 string. – erreka Jan 4 '16 at 21:59
  • It works, but the file is language.def, not language.dat. – User Jan 4 '16 at 22:29
  • As for plain formats, as stated in babel's documentation, I stand corrected. – erreka Jan 4 '16 at 22:46

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.