summaryrefslogtreecommitdiff
path: root/macros/generic
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-04 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2021-07-04 03:01:24 +0000
commit7994f86ec5e18f9d0d9f90161a2f26dd26d26af7 (patch)
tree88edb7d1a1aed3183a1350202c898716b4ac59ce /macros/generic
parent03fa062b03ce2bb5385f8f30888f94d441fa5cb4 (diff)
CTAN sync 202107040301
Diffstat (limited to 'macros/generic')
-rw-r--r--macros/generic/ifptex/LICENSE2
-rw-r--r--macros/generic/ifptex/README-ja.md3
-rw-r--r--macros/generic/ifptex/README.md3
-rw-r--r--macros/generic/ifptex/ifptex.sty99
-rw-r--r--macros/generic/ifptex/ifuptex.sty6
5 files changed, 36 insertions, 77 deletions
diff --git a/macros/generic/ifptex/LICENSE b/macros/generic/ifptex/LICENSE
index 534324b756..ead3a3702e 100644
--- a/macros/generic/ifptex/LICENSE
+++ b/macros/generic/ifptex/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2019 Takayuki YATO (aka. "ZR")
+Copyright (c) 2008-2021 Takayuki YATO (aka. "ZR")
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/macros/generic/ifptex/README-ja.md b/macros/generic/ifptex/README-ja.md
index 7578fcbe29..49fc486c06 100644
--- a/macros/generic/ifptex/README-ja.md
+++ b/macros/generic/ifptex/README-ja.md
@@ -88,6 +88,9 @@ LaTeX の場合:
更新履歴
--------
+ * Version 2.1 〈2021/07/01〉
+ - 将来の版の pTeX に対応させる。
+ - とある非公開機能を削除。
* Version 2.0 〈2019/11/01〉
- LaTeX チームによる新しい iftex パッケージと動作を整合させる。
- 特に、iftex を中で読み込むようにする。
diff --git a/macros/generic/ifptex/README.md b/macros/generic/ifptex/README.md
index 9b5975b2e9..4b09b0baff 100644
--- a/macros/generic/ifptex/README.md
+++ b/macros/generic/ifptex/README.md
@@ -94,6 +94,9 @@ Just the same as the ifptex package.
Revision History
----------------
+ * Version 2.1 〈2021/07/01〉
+ - Adjust for the future version of pTeX.
+ - Drop an undocumented feature.
* Version 2.0 〈2019/11/01〉
- Adjust to work better with the new iftex package maintanined
by the LaTeX3 Project.
diff --git a/macros/generic/ifptex/ifptex.sty b/macros/generic/ifptex/ifptex.sty
index e16121a381..a3e63d8d5d 100644
--- a/macros/generic/ifptex/ifptex.sty
+++ b/macros/generic/ifptex/ifptex.sty
@@ -1,7 +1,7 @@
%%
%% This is file 'ifptex.sty'.
%%
-%% Copyright (c) 2019 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2008-2021 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
@@ -70,7 +70,7 @@
%% package declaration
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ifptex}[2019/11/01 v2.0 pTeX checker]
+\ProvidesPackage{ifptex}[2021/07/01 v2.1 pTeX checker]
\def\bxip@pkgname{ifptex}
%% packages
@@ -153,7 +153,29 @@
\global\mathchardef\bxip@uptex@new@version=19
%%<+> \upTeXguessedversion
+% NB: The value of \upTeXguessedversion on pTeX is zero.
\global\mathchardef\upTeXguessedversion=0
+\bxip@test@primitive\ptexversion\ifbxip@ok %<*version>
+% If \(u)ptexversion is supported...
+
+ % get version from \uptexversion/revision
+ \bxip@test@primitive\uptexversion\ifbxip@ok
+ \bxip@test@primitive\uptexrevision\ifbxip@ok
+ \def\bxip@tmpa#1#2#3#4\relax{%
+ \chardef\bxip@tmpa=0\relax
+ \ifx.#1\afterassignment\bxip@tmpb\chardef\bxip@tmpa=0#2#3\relax
+ \fi}
+ \def\bxip@tmpb#1\relax{}
+ \expandafter\bxip@tmpa\uptexrevision????\relax
+ \bxip@cnta=\uptexversion\relax
+ \multiply\bxip@cnta100\relax
+ \advance\bxip@cnta\bxip@tmpa
+ \global\mathchardef\upTeXguessedversion=\bxip@cnta
+ \fi\fi
+
+\else %<*!version>
+% If \(u)ptexversion is not supported...
+
% if \ucs exists, then gv >= 1
\bxip@test@primitive\ucs\ifbxip@ok
\global\mathchardef\upTeXguessedversion=1
@@ -171,6 +193,8 @@
\fi
\fi
+\fi %</version>
+
%--------------------------------------- public stuffs
% Note:
% 1) Names '\ifFooTeX' were used in old iftex.
@@ -254,77 +278,6 @@
\bxip@protected\gdef\RequireStrictpTeXng{%
\bxip@Require\ifstrictpTeXng{pTeX-ng}\fi}
-%--------------------------------------- KanjiKoodo declaration
-\ifpTeX \ifx t\bxip@latex
-
-%% \bxip@def@str\CS{<strcode>}
-\def\bxip@def@str#1#2{%
- \let\bxip@str\@empty#2\let#1\bxip@str}
-\def\bxip@def@str@j#1{%
- \kansujichar1=#1\relax\edef\bxip@str{\bxip@str\kansuji1}}
-\def\bxip@def@str@a#1{%
- \uccode`\?=#1\relax\uppercase{\edef\bxip@str{\bxip@str?}}}
-\def\U/#1#2#3#4{\bxip@def@str@j{\ucs"#1#2#3#4}}
-\ifx\ucs\@undefined \def\U/#1#2#3#4{}\fi
-\def\J/#1#2#3#4{\bxip@def@str@j{\jis"#1#2#3#4}}
-\def\X/#1#2{\bxip@def@str@a{"#1#2}}
-
-%% KanjiKoodo strings
-% This is the correct "KanjiKoodo=".
-\bxip@def@str\bxip@@knjcde@u@u
-{\J/3441\J/3B7A\J/2533\J/213C\J/2549\X/3D}
-% This is the token list that results when upTeX with settings
-% "kanji=sjis, kanji-internal=uptex" reads the string "KanjiKoodo="
-% written in UTF-8. Note that mojibake will ocuur unless "kanji=utf8".
-\bxip@def@str\bxip@@knjcde@s@u
-{\U/8C8D\X/A2\U/87C4\U/52B1\U/3055\U/7E5D\X/BC\U/7E5D\X/89\X/3D}
-% Ditto, with settings "kanji=sjis, kanji-internal=sjis", and so on....
-\bxip@def@str\bxip@@knjcde@s@s
-{\J/6C3E\X/A2\J/6A2F\J/4E65\J/2435\J/6563\X/BC\J/6563\X/89\X/3D}
-\bxip@def@str\bxip@@knjcde@s@e
-{\J/6C3E\J/226A\J/2F4E\J/6524\J/3565\J/633C\J/6563\X/89\X/3D}
-\bxip@def@str\bxip@@knjcde@e@u
-{\U/7FB2\U/221A\X/AD\X/97\X/E3\X/82\U/6F5F\X/83\U/82E5\X/83\X/89\X/3D}
-\bxip@def@str\bxip@@knjcde@e@s
-{\J/663C\J/2265\X/AD\J/4E65\J/236A\J/2563\J/3C63\J/2569\X/3D}
-\bxip@def@str\bxip@@knjcde@e@e
-{\J/663C\J/2265\X/AD\X/97\X/E3\X/82\J/3363\X/83\J/3C63\X/83\X/89\X/3D}
-
-%% KanjiKoodo control sequences
-% The correct \[KanjiKoodo=UTF-8], meaning input kanji code is right.
-\global\@namedef{\bxip@@knjcde@u@u UTF-8}{\bxip@ensure@utf{}}
-% The mojibake \[XXXXX=UTf-8], meaning input kanji code is wrong.
-\global\@namedef{\bxip@@knjcde@s@u UTF-8}{\bxip@ensure@utf{sjis}}
-\global\@namedef{\bxip@@knjcde@s@s UTF-8}{\bxip@ensure@utf{sjis}}
-\global\@namedef{\bxip@@knjcde@s@e UTF-8}{\bxip@ensure@utf{sjis}}
-\global\@namedef{\bxip@@knjcde@e@u UTF-8}{\bxip@ensure@utf{euc}}
-\global\@namedef{\bxip@@knjcde@e@s UTF-8}{\bxip@ensure@utf{euc}}
-\global\@namedef{\bxip@@knjcde@e@e UTF-8}{\bxip@ensure@utf{euc}}
-
-%% \bxip@ensure@utf{<enc>}
-\gdef\bxip@ensure@utf#1{%
- \ifx @#1@\expandafter\@gobble
- \else \expandafter\@firstofone
- \fi{\bxip@ensure@utf@a{#1}}}
-\ifx\epTeXinputencoding\@undefined
- \gdef\bxip@ensure@utf@a#1{%
- \PackageWarning\bxip@pkgname
- {The input kanji code for file '\@currname.\@currext'\MessageBreak
- is set to #1, but should be utf8\@gobble}}%
-\else
- \gdef\bxip@ensure@utf@a#1{%
- \PackageInfo\bxip@pkgname
- {The input kanji code for file '\@currname.\@currext'\MessageBreak
- was changed from #1 to utf8\@gobble}%
- \ifnum\currentgrouplevel>\z@
- \aftergroup\bxip@ensure@utf@b
- \else \expandafter\bxip@ensure@utf@b
- \fi}
- \gdef\bxip@ensure@utf@b{%
- \epTeXinputencoding utf8}% unterminated
-\fi
-
-\fi\fi
%--------------------------------------- deprecated stuffs
%%<+>D \ifNativeupTeX == \ifnativeupTeX
diff --git a/macros/generic/ifptex/ifuptex.sty b/macros/generic/ifptex/ifuptex.sty
index a60dd36d4d..0489b25eb7 100644
--- a/macros/generic/ifptex/ifuptex.sty
+++ b/macros/generic/ifptex/ifuptex.sty
@@ -1,7 +1,7 @@
%%
%% This is file 'ifuptex.sty'.
%%
-%% Copyright (c) 2019 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2008-2021 Takayuki YATO (aka. "ZR")
%% GitHub: https://github.com/zr-tex8r
%% Twitter: @zr_tex8r
%%
@@ -52,11 +52,11 @@
%% package declaration
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ifuptex}[2019/11/01 v2.0 pTeX checker]
+\ProvidesPackage{ifuptex}[2021/07/01 v2.1 pTeX checker]
%% load ifptex
\bxip@input
-\RequirePackage{ifptex}[2019/11/01]
+\RequirePackage{ifptex}[2021/07/01]
%% all done
\bxip@up@restore@codes