OSDN Git Service

fix "Command `\colon' already defined" error when fontspec is loaded without no-math...
[luatex-ja/luatexja.git] / src / patches / lltjp-xunicode.sty
index 74df57b..bff08c3 100644 (file)
@@ -3,9 +3,9 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-xunicode}[2012/04/18 Patch to xunicode for LuaLaTeX-ja]
+\ProvidesPackage{lltjp-xunicode}[2013/05/14 Patch to xunicode for LuaTeX-ja]
 
-\def\UTFencname{EU2}\def\XeTeXpicfile{}
+\def\XeTeXpicfile{}
 \RequirePackage{xunicode,luatexja}
 {\catcode`\"=12
 \gdef\check@hexcom@digits@#1#2#3#4#5@!@#6#7#8{%
 % Therefore temporarily set \hbar=\relax.
 \let\ltj@tmpa\hbar
 \let\hbar\relax
+
 \let\ltj@tmpb\iftipaonetoken
 \let\iftipaonetoken\relax
-\ReloadXunicode{EU2}
+\typeout{UTFencname: \UTFencname}
+\let\ltj@temp=\@temp
+\edef\@temp{\noexpand\ReloadXunicode{\UTFencname}}\@temp
 \makeatletter
+\let\@temp=\ltj@temp\let\ltj@temp\relax
 \let\hbar\ltj@tmpa
 \let\iftipaonetoken\ltj@tmpb
 \let\ltj@tmpb\relax % no more an if-token
+
+%% ticket 30501
+{\catcode`\!0\catcode`\\11!catcode`!2 11!catcode`!?11!catcode`!-11
+ !expandafter!gdef!csname!UTFencname \nobreakspace!endcsname{!?-\nobreakspace}%
+}
+
 \endinput