summaryrefslogtreecommitdiff
path: root/language/japanese/plautopatch/plextcolortbl.sty
blob: 08ae5bd82dcf990cc7fb482ce6cb4822491222bc (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
38
39
%
% plextcolortbl.sty
% written by Hironobu Yamashita (@aminophen)
%
% This package is part of the plautopatch bundle.
% https://github.com/aminophen/plautopatch
%
% This package is expected to be compatible with
%   * colortbl.sty
%     (2012/06/21 v1.0b -- 2018/12/12 v1.0d)
%   * plext.sty in platex
%     (2001/09/26 v1.2  -- 2018/10/07 v1.2k)
%

%% package declaration
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{plextcolortbl}
  [2018/09/19 v0.1a Merge plext and colortbl]
\RequirePackage{plextarray}% colortbl requires array
\RequirePackageWithOptions{colortbl}

%% patching internal code for colortbl.sty
%
\AtBeginDocument{%
  % recover \@tabarray from plextarray.sty
  \def\@tabarray{\@ifnextchar<\p@tabarray{\p@tabarray<Z>}}
  % change \p@tabarray instead
  \expandafter\def\expandafter\p@tabarray
    \expandafter<\expandafter#\expandafter1\expandafter>\expandafter{%
    \expandafter\CT@start\p@tabarray<#1>}%
}
%
\def\endarray{\crcr \egroup \egroup
  \@end@alignbox %% added from plext.sty
  \@arrayright \gdef\@preamble{}\CT@end}%
%
%% done

\endinput