texlive[66803] Master/texmf-dist: ifptex (8apr23)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 8 21:54:18 CEST 2023


Revision: 66803
          http://tug.org/svn/texlive?view=revision&revision=66803
Author:   karl
Date:     2023-04-08 21:54:17 +0200 (Sat, 08 Apr 2023)
Log Message:
-----------
ifptex (8apr23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/ifptex/LICENSE
    trunk/Master/texmf-dist/doc/generic/ifptex/README-ja.md
    trunk/Master/texmf-dist/doc/generic/ifptex/README.md
    trunk/Master/texmf-dist/tex/generic/ifptex/ifptex.sty
    trunk/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty

Modified: trunk/Master/texmf-dist/doc/generic/ifptex/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/generic/ifptex/LICENSE	2023-04-08 00:15:52 UTC (rev 66802)
+++ trunk/Master/texmf-dist/doc/generic/ifptex/LICENSE	2023-04-08 19:54:17 UTC (rev 66803)
@@ -1,6 +1,6 @@
 The MIT License
 
-Copyright (c) 2008-2022 Takayuki YATO (aka. "ZR")
+Copyright (c) 2008-2023 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

Modified: trunk/Master/texmf-dist/doc/generic/ifptex/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/ifptex/README-ja.md	2023-04-08 00:15:52 UTC (rev 66802)
+++ trunk/Master/texmf-dist/doc/generic/ifptex/README-ja.md	2023-04-08 19:54:17 UTC (rev 66803)
@@ -54,17 +54,17 @@
     pTeX-ng を使っているか。  
     ※一応 `\ifstrictptexng`(`\ifstrictpTeXng`)もある。
   * `\RequirepTeX`  
-    `\ifpTeX` 不成立の場合はエラーを出す。
+    `\ifptex` 不成立の場合はエラーを出す。
   * `\RequireStirctpTeX`  
-    `\ifstrictpTeX` 不成立の場合はエラーを出す。
+    `\ifstrictptex` 不成立の場合はエラーを出す。
   * `\RequireupTeX`  
-    `\ifupTeX` 不成立の場合はエラーを出す。
+    `\ifuptex` 不成立の場合はエラーを出す。
   * `\RequireStrictupTeX`  
-    `\ifstrictupTeX` 不成立の場合はエラーを出す。
+    `\ifstrictuptex` 不成立の場合はエラーを出す。
   * `\RequireNativeupTeX`  
-    `\ifnativeupTeX` 不成立の場合はエラーを出す。
+    `\ifnativeuptex` 不成立の場合はエラーを出す。
   * `\RequirepTeXng`  
-    `\ifpTeXng` 不成立の場合はエラーを出す。  
+    `\ifptexng` 不成立の場合はエラーを出す。  
     ※一応 `\RequireStrictpTeXng` もある。
   * `\upTeXguessedversion` [mathchardef-トークン]  
     upTeX のバージョンの推測値(を百倍した整数値)。  
@@ -73,10 +73,31 @@
   * `\RequireupTeXAtLeast{<要求値>}`  
     `\upTeXguessedversion` の値が要求値より小さい場合はエラーを出す。
   * `\RequireNativeupTeXAtLeast{<要求値>}`  
-    `\upTeXguessedversion` の値が要求値より小さいまたは `\ifnativeupTeX`
+    `\upTeXguessedversion` の値が要求値より小さいまたは `\ifnativeuptex`
     が不成立の場合はエラーを出す。
 
+以下に挙げる機能では(一般的な意味での)pLaTeX や upLaTeX が使われている
+かを判定する。ここでは upLaTeX は pLaTeX の一種とは見なされ**ない**。  
+※フォーマットが LaTeX でない場合は不成立となる。  
+※TeX エンジンが pTeX-ng である場合は不成立となる。  
 
+  * `\ifstrictplatex`[if-トークン]  
+    pLaTeX を使っているか。
+  * `\ifstrictuplatex`[if-トークン]  
+    upLaTeX を使っているか。
+  * `\ifporuplatex`[if-トークン]  
+    pLaTeX または upLaTeX を使っているか。
+  * \RequireStrictpLaTeX`
+    `\ifstrictplatex` 不成立の場合はエラーを出す。
+  * \RequireStrictupLaTeX`
+    `\ifstrictuplatex` 不成立の場合はエラーを出す。
+  * \RequirepOrupLaTeX`
+    `\ifporuplatex` 不成立の場合はエラーを出す。
+  * \RequireStrictupLaTeXAtLeast{<要求値>}`  
+    `\upTeXguessedversion` の値が要求値より小さいまたは `\ifstrictuplatex`
+    が不成立の場合はエラーを出す。
+
+
 ifuptex パッケージ ― ifptex の別名
 -----------------------------------
 
@@ -97,6 +118,13 @@
 更新履歴
 --------
 
+  * Version 2.2c 〈2023/04/08〉 
+      - `\RequireStrictupLaTeXAtLeast` を追加。
+  * Version 2.2b 〈2023/02/25〉 
+      - `\ifporuplatex` と `\RequirepOrupLaTeX` を追加。
+  * Version 2.2a 〈2023/02/23〉 
+      - (試験的) `\ifstrictplatex` と `\ifstrictuplatex` を(対応する
+        `Require...` 命令とともに)追加。
   * Version 2.2  〈2022/04/03〉 
       - `\upTeXguessedversion` を正式にサポート。
       - `\Require(Native)upTeXAtLeast` を追加。

Modified: trunk/Master/texmf-dist/doc/generic/ifptex/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/ifptex/README.md	2023-04-08 00:15:52 UTC (rev 66802)
+++ trunk/Master/texmf-dist/doc/generic/ifptex/README.md	2023-04-08 19:54:17 UTC (rev 66803)
@@ -57,17 +57,17 @@
   * `\ifptexng` (or `\ifpTeXng`) [if-token]  
     Whether the engine is pTeX-ng.
   * `\RequirepTeX`  
-    Issues an error if `\ifpTeX` fails.
+    Issues an error if `\ifptex` fails.
   * `\RequireStrictpTeX`  
-    Issues an error if `\ifstrictpTeX` fails.
+    Issues an error if `\ifstrictptex` fails.
   * `\RequireupTeX`  
-    Issues an error if `\ifupTeX` fails.
+    Issues an error if `\ifuptex` fails.
   * `\RequireStrictupTeX`  
-    Issues an error if `\ifstrictupTeX` fails.
+    Issues an error if `\ifstrictuptex` fails.
   * `\RequireNativeupTeX`  
-    Issues an error if `\ifnativeupTeX` fails.
+    Issues an error if `\ifnativeuptex` fails.
   * `\RequirepTeXng`  
-    Issues an error if `\ifpTeXng` fails.
+    Issues an error if `\ifptexng` fails.
   * `\upTeXguessedversion` [mathchardef-token]  
     The guessed value of upTeX version; given as a 100-folded integer.  
     NB. On version 1.23 or later, the value is correct.  
@@ -77,9 +77,29 @@
     required value.
   * `\RequireNativeupTeXAtLeast{<required>}`  
     Issues an error either if `\upTeXguessedversion` is smaller than
-    the given required value or if `\ifnativeupTeX` fails.
+    the given required value or if `\ifnativeuptex` fails.
 
+The following functions are for testing whether pLaTeX and/or upLaTeX
+(in their prevailing meaning) is used. There upLaTeX is not regarded as
+a kind of pLaTeX.
 
+  * `\ifstrictplatex`  [if-token]  
+    Whether pLaTeX is used.
+  * `\ifstrictuplatex`  [if-token]  
+    Whether upLaTeX is used.
+  * `\ifporuplatex`  [if-token]  
+    Whether pLaTeX or upLaTeX is used.
+  * `\RequireStrictpLaTeX`  
+    Issues an error if `\ifstrictplatex` fails.
+  * `\RequireStrictupLaTeX`  
+    Issues an error if `\ifstrictuplatex` fails.
+  * `\RequirepOrupLaTeX`  
+    Issues an error if `\ifporuplatex` fails.
+  * `\RequireStrictupLaTeXAtLeast{<required>}`  
+    Issues an error either if `\upTeXguessedversion` is smaller than
+    the given required value or if `\ifstrictuplatex` fails.
+
+
 ifuptex Package ― Alias of ifptex
 ----------------------------------
 
@@ -104,6 +124,13 @@
 Revision History
 ----------------
 
+  * Version 2.2c 〈2023/04/08〉 
+      - Add `\RequireStrictupLaTeXAtLeast`.
+  * Version 2.2b 〈2023/02/25〉 
+      - Add `\ifporuplatex` and `\RequirepOrupLaTeX`.
+  * Version 2.2a 〈2023/02/23〉 
+      - Add `\ifstrictplatex` and `\ifstrictupltex`, along with their
+        `Require...` counterparts.
   * Version 2.2  〈2022/04/03〉 
       - Officialy support `\upTeXguessedversion`.
       - Add `\Require(Native)upTeXAtLeast`.

Modified: trunk/Master/texmf-dist/tex/generic/ifptex/ifptex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/ifptex/ifptex.sty	2023-04-08 00:15:52 UTC (rev 66802)
+++ trunk/Master/texmf-dist/tex/generic/ifptex/ifptex.sty	2023-04-08 19:54:17 UTC (rev 66803)
@@ -1,7 +1,7 @@
 %%
 %% This is file 'ifptex.sty'.
 %%
-%% Copyright (c) 2008-2022 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2008-2023 Takayuki YATO (aka. "ZR")
 %%   GitHub:   https://github.com/zr-tex8r
 %%   Twitter:  @zr_tex8r
 %%
@@ -61,21 +61,24 @@
   \let\bxip at latex=f
   \long\def\bxip at input#1\ProvidesPackage#2[#3]{%
     \def\bxip at input\RequirePackage##1[##2]{\input ##1.sty\relax}%
+    \let\bxip at opt@input\bxip at input
     \immediate\write-1{Package: #2 #3}}
   \expandafter\bxip at input
 \else                          %<*LaTeX>
   \let\bxip at latex=t
   \let\bxip at input\relax
+  \def\bxip at opt@input\RequirePackage#1[#2]{%
+    \IfFileExists{#1.sty}{\RequirePackage{#1}[#2]}{}}
 \fi                            %</LaTeX>
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ifptex}[2022/04/03 v2.2 pTeX checker]
+\ProvidesPackage{ifptex}[2023/04/08 v2.2c pTeX checker]
 \def\bxip at pkgname{ifptex}
 
 %% packages
 \ifx\newif\@undefined\else
-\bxip at input
+\bxip at opt@input
 \RequirePackage{iftex}[2013/04/04]% v0.2
 \fi
 
@@ -142,7 +145,7 @@
 
 %% \bxip at protected
 \let\bxip at protected\protected
-\ifx\directlua\@undefined\else
+\ifx\directlua\@undefined\else % NB. this defines globally
   \directlua{tex.enableprimitives('bxip@', {'protected'})}
 \fi
 \bxip at csletcs{bxip at protected}{bxip at protected}
@@ -316,6 +319,28 @@
 %%<+> \ifstrictptexng == \ifstrictpTeXng
 \global\bxip at csletcs{ifstrictptexng}{ifstrictpTeXng}
 
+%%<+> \ifstrictuplatex
+\global\bxip at false{ifstrictuplatex}
+\if t\bxip at latex \ifnativeuptex \ifstrictuptex
+  \global\bxip at true{ifstrictuplatex}
+\fi\fi\fi
+%%<+> \ifstrictplatex
+\global\bxip at false{ifstrictplatex}
+\if t\bxip at latex \ifnativeuptex\else \ifstrictuptex
+  \global\bxip at true{ifstrictplatex}
+\fi\fi\fi
+\if t\bxip at latex \ifstrictptex
+  \global\bxip at true{ifstrictplatex}
+\fi\fi
+%%<+> \ifporuplatex
+\global\bxip at false{ifporuplatex}
+\ifstrictplatex
+  \global\bxip at true{ifporuplatex}
+\fi
+\ifstrictuplatex
+  \global\bxip at true{ifporuplatex}
+\fi
+
 %%<+> \RequirepTeX
 \bxip at protected\gdef\RequirepTeX{%
   \bxip at Require\ifpTeX{(u)pTeX}\fi}
@@ -337,6 +362,15 @@
 %%<+> \RequireStrictpTeXng
 \bxip at protected\gdef\RequireStrictpTeXng{%
   \bxip at Require\ifstrictpTeXng{pTeX-ng}\fi}
+%%<+> \RequireStrictpLaTeX
+\bxip at protected\gdef\RequireStrictpLaTeX{%
+  \bxip at Require\ifstrictplatex{pLaTeX}\fi}
+%%<+> \RequireStrictupLaTeX
+\bxip at protected\gdef\RequireStrictupLaTeX{%
+  \bxip at Require\ifstrictuplatex{upLaTeX}\fi}
+%%<+> \RequirepOrupLaTeX
+\bxip at protected\gdef\RequirepOrupLaTeX{%
+  \bxip at Require\ifporuplatex{((u)pLaTeX}\fi}
 
 %%<+> \RequireupTeXAtLeast{<min_version>}
 \bxip at protected\gdef\RequireupTeXAtLeast#1{%
@@ -352,6 +386,13 @@
   \else \bxip at err@required{upTeX in Unicode}%
   \fi}
 
+%%<+> \RequireStrictupLaTeXAtLeast{<min_version>}
+\bxip at protected\gdef\RequireStrictupLaTeXAtLeast#1{%
+  \ifstrictuplatex
+    \bxip at check@version\upTeXguessedversion{#1}{upTeX in Unicode}%
+  \else \bxip at err@required{upLaTeX}%
+  \fi}
+
 %--------------------------------------- deprecated stuffs
 
 %%<+>D \ifNativeupTeX == \ifnativeupTeX
@@ -385,6 +426,7 @@
 % clean up
 \let\bxip at latex\@undefined
 \let\bxip at input\@undefined
+\let\bxip at opt@input\@undefined
 \let\bxip at protected\@undefined
 \bxip at restore@codes
 \endinput

Modified: trunk/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty	2023-04-08 00:15:52 UTC (rev 66802)
+++ trunk/Master/texmf-dist/tex/generic/ifptex/ifuptex.sty	2023-04-08 19:54:17 UTC (rev 66803)
@@ -1,7 +1,7 @@
 %%
 %% This is file 'ifuptex.sty'.
 %% 
-%% Copyright (c) 2008-2022 Takayuki YATO (aka. "ZR")
+%% Copyright (c) 2008-2023 Takayuki YATO (aka. "ZR")
 %%   GitHub:   https://github.com/zr-tex8r
 %%   Twitter:  @zr_tex8r
 %%
@@ -52,7 +52,7 @@
 
 %% package declaration
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ifuptex}[2022/04/03 v2.2 pTeX checker]
+\ProvidesPackage{ifuptex}[2023/04/08 v2.2c pTeX checker]
 
 %% load ifptex
 \bxip at input



More information about the tex-live-commits mailing list.