TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is my preamble:

\documentclass[11pt, a4paper]{scrartcl}
  \usepackage{xunicode} %Если не ошибаюсь, то этот пакет уже загружает fontspec
  \usepackage{xltxtra}  %особой роли не должен вроде как играть и в будущем скорее всего не будет нужен

  \setmainfont{Liberation Serif}
  \usepackage[MeX,T1, plmath]{polski}
\usepackage{siunitx}    %Для использоваия едениц измерений СИ, пример смотреть в тексте
output-decimal-marker = {,},    %sisetup нужен, что бы вместо точки можно было использовать запятую.
per-mode = symbol   %Это что бы \per давала косую черту
}   %Для перечисления настроек обязательно нужна запятая между ними

% \DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ }

With this preamble i get

Command \nobreakspace unavailable in encoding EU1

If i uncomment \DeclareTextCommandDefault{\nobreakspace}{\leavevmode\nobreak\ } i get

Undefined control sequence

share|improve this question
up vote 14 down vote accepted

Don't load xunicode before fontspec (loaded by xltxtra). In a current system you don't need to load xunicode at all, fontspec will do it at the correct place.

share|improve this answer
Thx, now everything is ok. – HunOL Oct 23 '12 at 11:10

Unfortunately, xunicode must be loaded to get dots underneath certain letters in a consistent manner, unless one resorts to another solution for these dots. If fontspec is loaded before xunicode, or xlxtra, the dots do not work properly either. But if xunicode is called first, you get the error reported above, "Command \nobreakspace unavailable in encoding EU1 if i use xelatex".

Instead, I used the solution suggested here to redefine the \nobreakspace while using xunicode.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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