OSDN Git Service

fix "Command `\colon' already defined" error when fontspec is loaded without no-math...
[luatex-ja/luatexja.git] / src / lltjext.sty
index 8ce37b7..5845121 100644 (file)
@@ -3,8 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}
-   [2014/09/06 v1.2-ltj-3 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2015/09/18 v1.2-ltj-4 Macros for vertical writing]
 \RequirePackage{luatexja}
 
 \let\ltj@lltjext@orig@tabular=\tabular
@@ -22,7 +21,8 @@
 \def\X@tabular{\@ifnextchar<%>
    {\p@tabular}{\p@tabular<Z>}}
 \def\@stabular<#1>#2{\def\@halignto{to#2}\p@tabular<#1>}
-\def\p@tabular<#1>{\leavevmode \hbox \bgroup $\let\@acol\@tabacol
+\def\p@tabular<#1>{\leavevmode \hbox \bgroup 
+   \count@=\ltjgetparameter{direction}$\let\@acol\@tabacol
    \let\@classz\@tabclassz
    \let\@classiv\@tabclassiv \let\\\@tabularcr\p@tabarray<#1>}
 \def\p@tabarray<#1>{\m@th\@ifnextchar[%]
@@ -46,7 +46,7 @@
     \fi\fi\fi\fi
   \fi
   \ifx\box@dir\relax
-    \ifcase\ltjgetparameter{direction}
+    \ifcase\count@
        \or   \let\box@dir\dtou\@tempcnta=\dstrutbox% dtou
        \or\or\let\box@dir\tate\@tempcnta=\tstrutbox% tate
        \or   \let\box@dir\yoko\@tempcnta=\strutbox% yoko
 %%% kanji
 \def\Kanji#1{\expandafter\@Kanji\csname c@#1\endcsname}
 \def\@Kanji#1{\expandafter\kansuji\number #1}
-\def\kanji{\iftdir\expandafter\kansuji\fi}
+\def\kanji{\ifnum\ltjgetparameter{direction}=3 \expandafter\kansuji\fi}
 
 %%% bou
 %%%
 }
 
 
-\endinput
\ No newline at end of file
+\endinput