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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
%%
%% This is file `bxjscompat.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bxjscls.dtx (with options: `anc,compat')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from bxjscompat.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file bxjscls.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bxjscompat}
[2021/05/18 v2.5a BXJS document classes]
\def\bxac@pkgname{bxjscompat}
\let\bxac@engine=n
\def\bxac@do#1#2{%
\edef\bxac@tmpa{\string#1}%
\edef\bxac@tmpb{\meaning#1}%
\ifx\bxac@tmpa\bxac@tmpb #2\fi}
\bxac@do\XeTeXversion{\let\bxac@engine=x}
\bxac@do\luatexversion{\let\bxac@engine=l}
\ifx\jsAtEndOfClass\@undefined
\let\bxac@delayed@if@bxjs\@firstofone
\else \let\bxac@delayed@if@bxjs\jsAtEndOfClass
\fi
\newif\ifbxac@in@old@behavior
\let\ImposeOldLuaTeXBehavior\relax
\let\RevokeOldLuaTeXBehavior\relax
\ifx x\bxac@engine
\@onlypreamble\bxac@adjust@charclass
\bxac@delayed@if@bxjs{%
\@ifpackageloaded{xeCJK}{}{%else
\ifx\xe@alloc@intercharclass\@undefined\else
\ifnum\xe@alloc@intercharclass=\z@
\PackageInfo\bxac@pkgname
{Setting up interchar class for CJK...\@gobble}%
\InputIfFileExists{load-unicode-xetex-classes.tex}{%
\xe@alloc@intercharclass=3
}{%else
\PackageWarning\bxac@pkgname
{Cannot find file 'load-unicode-xetex-classes.tex'%
\@gobble}%
}%
\fi\fi
\ifnum\XeTeXcharclass"3041=\z@
\PackageInfo\bxac@pkgname
{Adjusting interchar class for CJK...\@gobble}%
\@for\bxac@x:={%
3041,3043,3045,3047,3049,3063,3083,3085,3087,308E,%
3095,3096,30A1,30A3,30A5,30A7,30A9,30C3,30E3,30E5,%
30E7,30EE,30F5,30F6,30FC,31F0,31F1,31F2,31F3,31F4,%
31F5,31F6,31F7,31F8,31F9,31FA,31FB,31FC,31FD,31FE,%
31FF%
}\do{\XeTeXcharclass"\bxac@x=\@ne}%
\fi
}%
}
\fi
\ifx l\bxac@engine
\unless\ifnum\luatexversion<80 \ifnum\luatexversion<85
\chardef\pdftexversion=200
\def\pdftexrevision{0}
\let\pdftexbanner\luatexbanner
\fi\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname outputmode\endcsname\relax\else
\def\bxac@ob@list{%
\do{\let}\pdfoutput{\outputmode}%
\do{\let}\pdfpagewidth{\pagewidth}%
\do{\let}\pdfpageheight{\pageheight}%
\do{\protected\edef}\pdfhorigin{{\pdfvariable horigin}}%
\do{\protected\edef}\pdfvorigin{{\pdfvariable vorigin}}}
\def\bxac@ob@do#1#2{\begingroup
\expandafter\bxac@ob@do@a\csname bxac@\string#2\endcsname{#1}#2}
\def\bxac@ob@do@a#1#2#3#4{\endgroup
\ifbxac@in@old@behavior \let#1#3\relax #2#3#4\relax
\else \let#3#1\relax \let#1\@undefined
\fi}
\protected\def\ImposeOldLuaTeXBehavior{%
\unless\ifbxac@in@old@behavior
\bxac@in@old@behaviortrue
\let\do\bxac@ob@do \bxac@ob@list
\fi}
\protected\def\RevokeOldLuaTeXBehavior{%
\ifbxac@in@old@behavior
\bxac@in@old@behaviorfalse
\let\do\bxac@ob@do \bxac@ob@list
\fi}
\fi
\ifnum\luatexversion>64 \directlua{
local function range(cs, ce, cc, ff)
if ff or not tex.getcatcode(cs) == cc then
local setcc = tex.setcatcode
for c = cs, ce do setcc(c, cc) end
end
end
range(0x3400, 0x4DB5, 11, false)
range(0x4DB5, 0x4DBF, 11, true)
range(0x4E00, 0x9FCC, 11, false)
range(0x9FCD, 0x9FFF, 11, true)
range(0xAC00, 0xD7A3, 11, false)
range(0x20000, 0x2A6D6, 11, false)
range(0x2A6D7, 0x2A6FF, 11, true)
range(0x2A700, 0x2B734, 11, false)
range(0x2B735, 0x2B73F, 11, true)
range(0x2B740, 0x2B81D, 11, false)
range(0x2B81E, 0x2B81F, 11, true)
range(0x2B820, 0x2CEA1, 11, false)
range(0x2CEA2, 0x2FFFD, 11, true)
}\fi
\fi
\endinput
%%
%% End of file `bxjscompat.sty'.
|