summaryrefslogtreecommitdiff
path: root/language/japanese/platex-tools/plextcolortbl.sty
blob: a56a3067cf140029ca64001044056c8ef04274b5 (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 -- 2020/01/04 v1.0e)
%   * plext.sty in platex
%     (2001/09/26 v1.2  -- 2020/10/07 v1.2m)
%

%% 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