I tried to typeset a plain TeX document with the ngerman.sty macro set. Unfortunately, I get the following output for a simple test file containing nothing but \input ngerman.sty\end:

This is TeX, Version 3.1415926 (TeX Live 2013/Debian)
(./q.tex (/usr/share/texlive/texmf-dist/tex/generic/german/ngerman.sty
v2.5e 1998-07-08
ngerman -- \language number for ngerman undefined, default 255 used,
ngerman -- Please read "gerdoc.tex" how to install hyphenation patterns.) )
No pages of output.
Transcript written on test.log.

First, I'd like to know if this is an error and if yes, how do I fix it? The same error appears when I try to typeset the document with xetex, etex, or pdftex. I am a bit new to plain TeX and this is the first time I try to do something slightly complex after reading the TeXbook. I use TeXlive on Ubuntu 14.04.1. As far as I am concerned, all packages from the TeXlive distribution are installed on my system

  • As far as you know you can't use a .sty file in plain TeX (please correct me if I'm wrong). You can use (most) LaTeX packages with eplain (not bundled with TeXlive). What are you trying to do? In XeTeX, I can type \uselanguage{german} to use correct hyphenation. – Marcel Korpel Oct 21 '14 at 21:32
  • You need a format where the languages have been loaded, which is not the case for plain.fmt. – egreg Oct 21 '14 at 21:33
  • @MarcelKorpel ngerman.sty provides some macros that make typesetting German easier, notably it makes " active so you can typeset umlauts with "a instead of \\"a. The documentation for ngerman.sty explicitly states that it can be used this way in plain TeX. – FUZxxl Oct 21 '14 at 21:34
  • @egreg Is there such a format that is otherwise like plain.fmt in TeXlive? – FUZxxl Oct 21 '14 at 21:37
  • Perhaps not what you asked for, but in XeTeX, you can simply type ä in UTF-8 and your document (with OpenType fonts) compiles fine. I use a special .Xmodmap to make it easier to type characters with diacritics. – Marcel Korpel Oct 21 '14 at 22:12

The hyphenation patterns for the various languages must be loaded at format creation. The plain.fmt file is built with patterns only for English.

You can enable languages by creating a format yourself:

  1. from the terminal run

    pdftex -etex -ini "\input bplain\dump"
  2. send the command

    mkdir -p $(kpsewhich -var-value TEXMFHOME)/web2c/pdftex
  3. send the command

    mv bplain.* $(kpsewhich -var-value TEXMFHOME)/web2c/pdftex/
  4. run TeX on your file by

    pdftex -fmt bplain fuzxxl

    (of course, use the real file name)

You may want to create an alias for this, or a special command for your front end.

For XeTeX this is not necessary, because the format loads all available languages. However the language you need is named


instead of the expected \l@ngerman. Add the following incantation at the beginning of your file


and you should be OK.

  • Given that I would like to use XeTeX, is this also the way to proceed, but with XeTeX substituted for pdftex? – FUZxxl Oct 21 '14 at 22:11
  • @FUZxxl No, that won't work because one has to use UTF-8 patterns. I'll give a try. – egreg Oct 21 '14 at 22:16
  • 2
    @FUZxxl It was easier than expected, see the addition to my answer. However, I can't guarantee that the old ngerman.sty will work as expected. You're best served with LaTeX, in my opinion. – egreg Oct 21 '14 at 22:22

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.