1

I try to use XeLaTex with localisation to another language, in my case German. But when I compile the following minimal code

\documentclass[a4paper]{scrartcl}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage{de}

\begin{document}
\begin{figure}
    \centering
    Test Test Test Test \TeX \XeTeX
    \caption{Eine Abbildung}
\end{figure}
\end{document}

I get this error message:

Package polyglossia Warning: File gloss-de.ldf does not exist!
(polyglossia)                I will nevertheless try to use hyphenation pattern
s for de. on input line 4.

Package polyglossia Warning: \setlocalhyphenmin useless for unknown language de
on input line 4.

Package polyglossia Warning: No hyphenation patterns were loaded for `De'
(polyglossia)              
I will use \language=\l@nohyphenation instead on input line 4.

Nevertheless a pdf is produced though it has the wrong localisation. The used command is xelatex -interaction=nonstopmode polyglossia_problem.tex.

I use the MiKTeX distribution under Windows 7 64-bit.

What can I do to load the missing files? The latex pendant with babel works on my machine.

1
  • 1
    The correct command is german, not de.
    – Alenanno
    Jan 10, 2016 at 12:05

1 Answer 1

5

polyglossia is complaining because de is not the correct command, you need to issue german instead. In this case, the code will compile with 0 errors.

enter image description here

Some notes:

  1. the \ after \TeX is there to preserve the space that comes afterwards.
  2. the german language has some options for the polyglossia package. For example, spelling can be

"new (= 1996) or old (= 1901): indicates whether hyphenation patterns for traditional (1901) or reformed (1996) orthography should be used."

You can check the Section 6.8 of the Manual for more options.

And here's the code

\documentclass[a4paper]{scrartcl}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage{german}

\begin{document}
\begin{figure}
    \centering
    Test Test Test Test \TeX\ \XeTeX
    \caption{Eine Abbildung}
\end{figure}
\end{document}
5
  • You could mention spelling=new.
    – Johannes_B
    Jan 10, 2016 at 12:10
  • @Johannes_B Never used it before. Is that about hyphenation with modern spelling?
    – Alenanno
    Jan 10, 2016 at 12:12
  • @Johannes_B I'll add that.
    – Alenanno
    Jan 10, 2016 at 12:15
  • Sí, new spelling and hyphenation.
    – Johannes_B
    Jan 10, 2016 at 12:18
  • @chr Don't worry! Everything seems obvious after you understand it. Besides, it happens to everyone.
    – Alenanno
    Jan 10, 2016 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .