summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/patches/lltjp-collcell.sty
blob: 43864429276e77343cfec1fee9daf8b2bb41bb4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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