summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-04 22:14:01 +0000
committerKarl Berry <karl@freefriends.org>2017-05-04 22:14:01 +0000
commit673a8d0f7aca9c451d1a2e325e8479824b1a0df2 (patch)
treec7c963103e3a24f5b336a5cea25b9e80ea436ebb
parent7026f62c118b13c173024f7a2748d1088fd48779 (diff)
ifptex (4may17)
git-svn-id: svn://tug.org/texlive/trunk@44194 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/ifptex/LICENSE21
-rw-r--r--Master/texmf-dist/doc/generic/ifptex/README-ja.md90
-rw-r--r--Master/texmf-dist/doc/generic/ifptex/README.md100
-rw-r--r--Master/texmf-dist/tex/generic/ifptex/ifptex.sty224
-rw-r--r--Master/texmf-dist/tex/generic/ifptex/ifuptex.sty54
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/ifptex.tlpsrc0
8 files changed, 491 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/generic/ifptex/LICENSE b/Master/texmf-dist/doc/generic/ifptex/LICENSE
new file mode 100644
index 00000000000..8ada757fbc8
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/ifptex/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2017 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
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/Master/texmf-dist/doc/generic/ifptex/README-ja.md b/Master/texmf-dist/doc/generic/ifptex/README-ja.md
new file mode 100644
index 00000000000..2ed2e754b71
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/ifptex/README-ja.md
@@ -0,0 +1,90 @@
+ifptex パッケージバンドル
+=========================
+
+TeX: エンジンが pTeX(やその派生)であるかを判定する
+
+ifptex パッケージは ifxetex や ifluatex 等のパッケージの pTeX 版に
+相当する。ifuptex パッケージは ifptex の別名で、後方互換性のために
+用意されている。
+
+### システム要件
+
+ - TeX フォーマット: plain TeX、LaTeX (および他の plain 互換なもの)
+ - TeX エンジン: 不問
+ - DVI ウェア(DVI 出力時): 不問
+
+### インストール
+
+TDS 1.1 に準拠するシステムの場合、以下のようにファイルを移動する:
+
+ - `*.sty` → $TEXMF/tex/latex/ifptex
+
+この後必要に応じて mktexlsr を実行する。
+
+ifptex パッケージ ― pTeX 系エンジンの判定
+------------------------------------------
+
+### パッケージ読込
+
+plain TeX の場合:
+
+ \input ifptex.sty
+
+LaTeX の場合:
+
+ \usepackage{ifptex}
+
+### 機能
+
+ * `\ifpTeX`(又は `\ifptex`)[if-トークン]
+ pTeX(upTeX を含む)を使っているか。
+ * `\ifstrictpTeX`(又は `\ifstrictptex`)[if-トークン]
+ pTeX(upTeX ではなく)を使っているか。
+ * `\ifupTeX`(又は `\ifuptex`) [if-トークン]
+ upTeX を使っているか。
+ * `\ifnativeupTeX` [if-トークン]
+ upTeX を内部文字コードが Unicode の状態で使っているか。
+ * `\ifpTeXng`(又は `\ifptexng`)[if-トークン]
+ pTeX-ng を使っているか。
+ * `\RequirepTeX`
+ `\ifpTeX` 不成立の場合はエラーを出す。
+ * `\RequireupTeX`
+ `\ifupTeX` 不成立の場合はエラーを出す。
+ * `\RequireNativeupTeX`
+ `\ifNativeupTeX` 不成立の場合はエラーを出す。
+ * `\RequirepTeXng`
+ `\ifpTeXng` 不成立の場合はエラーを出す。
+
+
+ifuptex パッケージ ― ifptex の別名
+-----------------------------------
+
+ただ単に ifptex を読み込むだけのパッケージであり、0.2 版との後方互換性の
+ために用意されている。
+
+### パッケージ読込
+
+plain TeX の場合:
+
+ \input ifuptex.sty
+
+LaTeX の場合:
+
+ \usepackage{ifuptex}
+
+
+更新履歴
+--------
+
+ * Version 1.1 〈2017/05/04〉
+ - 細かい調整。
+ * Version 1.0 〈2013/04/29〉
+ - 独立のバンドルに移動。
+ - パッケージ名を ifptex に変更して、pTeX 判定機能を付加。
+ - (試験的) upTeX の版判定機能を追加。
+ * Version 0.2 〈2008/03/14〉
+ - 最初の公開版。
+
+--------------------
+Takayuki YATO (aka. "ZR")
+https://github.com/zr-tex8r
diff --git a/Master/texmf-dist/doc/generic/ifptex/README.md b/Master/texmf-dist/doc/generic/ifptex/README.md
new file mode 100644
index 00000000000..05591ab2fd8
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/ifptex/README.md
@@ -0,0 +1,100 @@
+ifptex Package Bundle
+=====================
+
+TeX: To check the engine is pTeX (or its derivatives)
+
+The ifptex package is a counterpart of ifxetex, ifluatex, etc. for
+the pTeX engine. The ifuptex package is an alises to ifptex provided
+for backward compatibility.
+
+### System Requirements
+
+ - TeX format: plain TeX, LaTeX (and any plain-compatible ones).
+ - TeX engine: Anything.
+ - DVI driver (in DVI mode): Anything.
+
+### Installation
+
+In a system compliant to TDS 1.1, move the files as follows:
+
+ - `*.sty` → $TEXMF/tex/latex/ifptex
+
+And rehash your TEXMF trees if necessary.
+
+### License
+
+This package is distributed under the MIT License.
+
+ifptex Package ― Test for pTeX engine
+--------------------------------------
+
+### Package Loading
+
+In plain TeX:
+
+ \input ifptex.sty
+
+In LaTeX:
+
+ \usepackage{ifptex}
+
+### Usage
+
+ * `\ifpTeX` (or `\ifptex`) [if-token]
+ Whether the engine is pTeX (or its derivative, including upTeX).
+ * `\ifstrictpTeX` (or `\ifstrictptex`) [if-token]
+ Whether the engine is pTeX (or its derivative) but *not* upTeX.
+ * `\ifupTeX` (or `\ifuptex`) [if-token]
+ Whether the engine is upTeX (or its derivative).
+ * `\ifnativeupTeX` [if-token]
+ Whether the engine is upTeX and its internal encoding is Unicode.
+ * `\ifpTeXng` (or `\ifptexng`) [if-token]
+ Whether the engine is pTeX-ng.
+ * `\RequirepTeX`
+ Issues an error if `\ifpTeX` fails.
+ * `\RequireStrictpTeX`
+ Issues an error if `\ifstrictpTeX` fails.
+ * `\RequireupTeX`
+ Issues an error if `\ifupTeX` fails.
+ * `\RequireNativeupTeX`
+ Issues an error if `\ifnativeupTeX` fails.
+ * `\RequirepTeXng`
+ Issues an error if `\ifpTeXng` fails.
+
+
+ifuptex Package ― Alias of ifptex
+----------------------------------
+
+The ifuptex package does nothing but loading ifptex internally. It is
+provided for backward compatibility.
+
+### Package Loading
+
+In plain TeX:
+
+ \input ifuptex.sty
+
+In LaTeX:
+
+ \usepackage{ifuptex}
+
+### Usage
+
+Just the same as the ifptex package.
+
+
+Revision History
+----------------
+
+ * Version 1.1 〈2017/05/04〉
+ - Minor fix.
+ * Version 1.0 〈2013/04/29〉
+ - Move to a separate bundle.
+ - Change the package name to ifptex, and added the test
+ for pTeX (besides upTeX).
+ * Version 0.2 〈2008/03/14〉
+ - First public version.
+
+--------------------
+Takayuki YATO (aka. "ZR")
+https://github.com/zr-tex8r
diff --git a/Master/texmf-dist/tex/generic/ifptex/ifptex.sty b/Master/texmf-dist/tex/generic/ifptex/ifptex.sty
new file mode 100644
index 00000000000..75273980832
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/ifptex/ifptex.sty
@@ -0,0 +1,224 @@
+%%
+%% This is file 'ifptex.sty'.
+%%
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%% GitHub: https://github.com/zr-tex8r
+%% Twitter: @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+%
+%% avoid multiple loading
+\csname\if11bxipIfptexLoaded\fi\endcsname
+%% code guards
+\edef\x{%
+\catcode32=\the\catcode32%
+\catcode33=\the\catcode33%
+\catcode35=\the\catcode35%
+\catcode42=\the\catcode42%
+\catcode60=\the\catcode60%
+\catcode62=\the\catcode62%
+\catcode64=\the\catcode64%
+\catcode91=\the\catcode91%
+\catcode93=\the\catcode93%
+\relax}
+\catcode32=10\relax
+\catcode33=11 %<">
+\catcode35=6 %<#>
+\catcode42=12 %<*>
+\catcode60=12 %<<>
+\catcode62=12 %<>>
+\catcode64=11 %<@>
+\catcode91=12 %<[>
+\catcode93=12 %<]>
+\edef\bxip@restore@codes{\x
+ \noexpand\let\noexpand\bxip@restore@codes\relax}
+\def\bxipIfptexLoaded{\endinput}
+
+%% check for LaTeX
+\ifx\RequirePackage\@undefined %<*!LaTeX>
+ \let\bxip@latex=f
+ \long\def\x#1\ProvidesPackage#2[#3]{%
+ \immediate\write-1{Package: #2 #3}}
+ \expandafter\x
+\else %<*LaTeX>
+ \let\bxip@latex=t \let\x\relax
+\fi %</LaTeX>
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ifptex}[2017/05/04 v1.1-pre pTeX checker]
+
+%% enter the big group
+\begingroup
+
+%--------------------------------------- helpers
+
+%% \bxip@csletcs{<csnameA>}{<csnameB>}
+\def\bxip@csletcs#1#2{%
+ \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
+%% \bxip@true{<csname>}
+\def\bxip@true#1{%
+ \expandafter\let\csname#1\endcsname\iftrue}
+%% \bxip@false{<csname>}
+\def\bxip@false#1{%
+ \expandafter\let\csname#1\endcsname\iffalse}
+
+%% switches
+\bxip@false{ifbxip@ok}
+
+%% \bxip@test@primitive\CS
+\def\bxip@test@primitive#1{%
+ \edef\bxip@tmpa{\string#1}\edef\bxip@tmpb{\meaning#1}%
+ \ifx\bxip@tmpa\bxip@tmpb \bxip@true{ifbxip@ok}%
+ \else \bxip@false{ifbxip@ok}%
+ \fi}
+
+%% \bxip@with@default{<arg>}\CS
+\gdef\bxip@with@default#1#2{%
+ \def\bxip@tmpa{#2}\def\bxip@tmpb{#2[#1]}%
+ \futurelet\bxip@tok\bxip@with@default@a}
+\gdef\bxip@with@default@a{%
+ \ifx[\bxip@tok\expandafter\bxip@tmpa%]
+ \else \expandafter\bxip@tmpb
+ \fi}
+
+%% \bxip@check@version{<current>}{<required>}{<label>}
+\global\countdef\bxip@cnta=255
+\gdef\bxip@check@version#1#2#3{%
+ \ifnum#1<#2\relax
+ \begingroup
+ \bxip@cnta=#2\relax \advance\bxip@cnta100000\relax
+ \expandafter\bxip@check@version@a\the\bxip@cnta\relax{#3}%
+ \endgroup
+ \fi}
+\gdef\bxip@check@version@a#1#2#3#4#5#6\relax#7{%
+ \bxip@err@required{#7 v.>=\number#2#3#4.#5#6}}
+
+%% \bxip@err@required{<string>}
+% NB: Now the same style as in ifxetex is used.
+\gdef\bxip@err@required#1{%
+ \begingroup
+ \errorcontextlines=-1\relax
+ \newlinechar=10\relax
+ \errmessage{^^J
+ ********************************************^^J
+ * #1 is required to compile this document.^^J
+ * Sorry!^^J
+ ********************************************}%
+ \endgroup}
+
+%--------------------------------------- guess version
+
+%% \bxip@uptex@new@version
+\global\mathchardef\bxip@uptex@new@version=19
+
+%%<+> \upTeXguessedversion
+\global\mathchardef\upTeXguessedversion=0
+% if \ucs exists, then gv >= 1
+\bxip@test@primitive\ucs\ifbxip@ok
+ \global\mathchardef\upTeXguessedversion=1
+ % if \enablecjktoken exists, then gv >= 6
+ \bxip@test@primitive\enablecjktoken\ifbxip@ok
+ \global\mathchardef\upTeXguessedversion=6
+ % if \kchar exists, then gv >= 10
+ \bxip@test@primitive\kchar\ifbxip@ok
+ \global\mathchardef\upTeXguessedversion=10
+ % if \forcecjktoken exists, then gv >= 19
+ \bxip@test@primitive\forcecjktoken\ifbxip@ok
+ \global\mathchardef\upTeXguessedversion=19
+ \fi
+ \fi
+ \fi
+\fi
+
+%--------------------------------------- public stuffs
+
+%%<+> \ifpTeX
+\global\bxip@false{ifpTeX}
+\bxip@test@primitive\kanjiskip\ifbxip@ok
+ \global\bxip@true{ifpTeX}
+\fi
+%%<+> \ifptex == \ifpTeX
+\global\bxip@csletcs{ifptex}{ifpTeX}
+
+%%<+> \ifupTeX
+\global\bxip@false{ifupTeX}
+%%<+> \ifnativeupTeX
+\global\bxip@false{ifnativeupTeX}
+\ifnum\upTeXguessedversion>0
+ \global\bxip@true{ifupTeX}
+ % native-ness check
+ \ifnum\ucs"3000="3000 \global\bxip@true{ifnativeupTeX}\fi
+\fi
+%%<+> \ifuptex == \ifupTeX
+\global\bxip@csletcs{ifuptex}{ifupTeX}
+
+%%<+> \ifpTeXng
+\global\bxip@false{ifpTeXng}
+\bxip@test@primitive\ngbanner\ifbxip@ok
+ \global\bxip@true{ifpTeXng}
+\fi
+%%<+> \ifptexng == \ifpTeXng
+\global\bxip@csletcs{ifptexng}{ifpTeXng}
+
+%%<+> \ifstrictpTeX
+\global\bxip@false{ifstrictpTeX}
+\ifpTeX \ifupTeX\else
+ \global\bxip@true{ifstrictpTeX}
+\fi\fi
+%%<+> \ifstrictptex == \ifstrictpTeX
+\global\bxip@csletcs{ifstrictptex}{ifstrictpTeX}
+
+%%<+> \RequirepTeX
+\gdef\RequirepTeX{%
+ \ifpTeX\else \bxip@err@required{(u)pTeX}\fi}
+%%<+> \RequireStrictpTeX
+\gdef\RequireStrictpTeX{%
+ \ifstrictpTeX\else \bxip@err@required{pTeX (not upTeX)}\fi}
+%%<+> \RequireupTeX
+\gdef\RequireupTeX{%
+ \ifupTeX\else \bxip@err@required{upTeX}\fi}
+%%<+> \RequireNativeupTeX
+\gdef\RequireNativeupTeX{%
+ \ifnativeupTeX\else \bxip@err@required{upTeX in Unicode}\fi}
+%%<+> \RequirepTeXng
+\gdef\RequirepTeXng{%
+ \ifpTeXng\else \bxip@err@required{pTeX-ng}\fi}
+
+%--------------------------------------- deprecated stuffs
+
+%%<+>D \ifNativeupTeX == \ifnativeupTeX
+\global\bxip@csletcs{ifNativeupTeX}{ifnativeupTeX}
+%%<+>D \RequirenativeupTeX == \RequireNativeupTeX
+\gdef\RequirenativeupTeX{\RequireNativeupTeX}
+
+%%<+>D \ifnewupTeX
+\global\bxip@false{ifnewupTeX}
+\ifnum\upTeXguessedversion<\bxip@uptex@new@version\else
+ \global\bxip@true{ifnewupTeX}
+\fi
+
+%%<+>D \RequireNewupTeX
+\gdef\RequireNewupTeX{%
+ \bxip@with@default\bxip@uptex@new@version\bxip@require@new@uptex@a}
+\gdef\bxip@require@new@uptex@a[#1]{%
+ \ifupTeX
+ \bxip@check@version\upTeXguessedversion{#1}{upTeX}%
+ \else \bxip@err@required{upTeX}%
+ \fi}
+
+%%<+>D \RequireNativeNewupTeX
+\gdef\RequireNativeNewupTeX{%
+ \bxip@with@default\bxip@uptex@new@version\bxip@require@new@uptex@b}
+\gdef\bxip@require@new@uptex@b[#1]{%
+ \ifnativeupTeX
+ \bxip@check@version\upTeXguessedversion{#1}{upTeX in Unicode}%
+ \else \bxip@err@required{upTeX in Unicode}%
+ \fi}
+
+%--------------------------------------- all done
+\endgroup
+\bxip@restore@codes
+\endinput
+%% EOF
diff --git a/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty b/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty
new file mode 100644
index 00000000000..8742a0a2cac
--- /dev/null
+++ b/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty
@@ -0,0 +1,54 @@
+%%
+%% This is file 'ifuptex.sty'.
+%%
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%% GitHub: https://github.com/zr-tex8r
+%% Twitter: @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+%
+% NOTE: Now ifuptex is merely an alias to ifptex.
+%
+%% avoid multiple loading
+\csname\if11bxipIfuptexLoaded\fi\endcsname
+%% code guards
+\edef\x{%
+\catcode32=\the\catcode32%
+\catcode45=\the\catcode45%
+\catcode46=\the\catcode46%
+\catcode47=\the\catcode47%
+\catcode58=\the\catcode58%
+\catcode64=\the\catcode64%
+\relax}
+\catcode32=10\relax
+\catcode45=12 % <->
+\catcode46=12 % <.>
+\catcode47=12 % </>
+\catcode58=12 % <:>
+\catcode64=11 % <@>
+\edef\bxip@up@restore@codes{\x
+ \noexpand\let\noexpand\bxip@up@restore@codes\relax}
+\def\bxipIfuptexLoaded{\endinput}
+
+%% check for LaTeX
+\ifx\RequirePackage\@undefined % non-LaTeX
+ \long\def\x#1\ProvidesPackage#2[#3]{%
+ \def\x\RequirePackage##1[##2]{\input ##1.sty\relax}%
+ \immediate\write-1{Package: #2 #3}}
+ \expandafter\x
+\else % LaTeX
+ \let\x\relax
+\fi
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ifuptex}[2017/05/04 v1.1-pre upTeX checker]
+
+%% load ifptex
+\x\RequirePackage{ifptex}[2017/05/04]
+
+%% all done
+\bxip@up@restore@codes
+\endinput
+%% EOF
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 7d1170be691..1916e1fdc0f 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -319,7 +319,7 @@ my @TLP_working = qw(
hypdvips hyper hypernat hyperref hyperxmp hyph-utf8 hyphen-base
hyphenat hyphenex hyplain
ibycus-babel ibygrk icsv idxcmds idxlayout ieeepes ietfbibs
- ifetex iffont ifmslide ifmtarg ifnextok ifoddpage ifplatform ifsym
+ ifetex iffont ifmslide ifmtarg ifnextok ifoddpage ifplatform ifptex ifsym
iftex ifthenx ifxetex
iitem ijmart ijqc ijsra
imac image-gallery imakeidx impatient impatient-cn impatient-fr
diff --git a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
index df024bb486a..3fc10ab434b 100644
--- a/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
@@ -10,6 +10,7 @@ depend bxcjkjatype
depend bxjalipsum
depend bxjscls
depend convbkmk
+depend ifptex
depend ipaex
depend japanese-otf
depend japanese-otf-uptex
diff --git a/Master/tlpkg/tlpsrc/ifptex.tlpsrc b/Master/tlpkg/tlpsrc/ifptex.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/ifptex.tlpsrc