Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This is my preamble:

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

  \setdefaultlanguage{polish}
  \setmainfont{Liberation Serif}
\else
  \usepackage[utf8]{inputenc}
  \usepackage[MeX,T1, plmath]{polski}
  \usepackage{datetime}
\fi
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage[super]{cite}
\usepackage[hyperfootnotes=false]{hyperref}
\usepackage{siunitx}    %Для использоваия едениц измерений СИ, пример смотреть в тексте
\sisetup{
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
add comment

2 Answers

up vote 12 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
add comment

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
add comment

Your Answer

 
discard

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.