summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty')
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty37
1 files changed, 37 insertions, 0 deletions
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty
new file mode 100644
index 0000000000..4386442927
--- /dev/null
+++ b/macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty
@@ -0,0 +1,37 @@
+%
+% lltjp-collcell.sty
+%
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{lltjp-collcell}[2020/05/06 Patch to collcell for LuaTeX-ja]
+
+\RequirePackage{etoolbox,collcell}
+
+\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