OSDN Git Service

added lltjp-collcell.sty
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 5 May 2020 19:52:18 +0000 (04:52 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 5 May 2020 19:52:18 +0000 (04:52 +0900)
src/ltj-latex.sty
src/patches/lltjp-collcell.sty [new file with mode: 0644]

index ff6a72b..0d4823b 100644 (file)
@@ -79,6 +79,7 @@
 \ltj@pkgpatch{preview}  %% at \begin{document}
   % (preview package has delayed option)
 \ltj@pkgpatch{array}    %% at \begin{document}
+\ltj@pkgpatch{collcell} %% at \begin{document}
 \ltj@pkgpatch@im{unicode-math}
 \ltj@pkgpatch@im{siunitx}
 \ltj@pkgpatch@im{microtype}
diff --git a/src/patches/lltjp-collcell.sty b/src/patches/lltjp-collcell.sty
new file mode 100644 (file)
index 0000000..d28971f
--- /dev/null
@@ -0,0 +1,37 @@
+%
+% lltjp-collcell.sty
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{lltjp-array}[2020/05/06 Patch to collcell for LuaTeX-ja]
+
+\RequirePackage{etoolbox,array}
+
+\def\collcell@beforeuser{\ltjfakeboxbdd\ignorespaces}
+\def\collcell@afteruser{\unskip\ltjfakeboxbdd}
+
+\def\collectcell#1#2\relax\pltx@next@inhibitglue\ltjfakeboxbdd\ignorespaces{%
+  \begingroup
+  \collect@cell@count\z@
+  \collect@cell@toks{}%
+  \let\collect@cell@spaces\empty
+  \def\collect@cell@end{%
+    \expandafter\endgroup
+    \expandafter\collcell@beforeuser
+    \expandafter\ccell@swap\expandafter{\the\collect@cell@toks}{#1}%
+    \collcell@afteruser
+  }%
+  \collect@cell@look#2%
+}
+\patchcmd\collect@cell@arg{%
+    \cci{%
+      \collect@cell@look
+    }%
+}{
+    \cci{%
+      \collect@cell@look
+    }%
+       \ltjfakeboxbdd{\collect@cell@look}
+}{}{}
+
+\endinput