Directory macros/generic/ifptex
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 INI mode.
- TeX engine: Anything.
- DVI driver (in DVI mode): Anything.
- Dependent packages:
- iftex
Installation
In a system compliant to TDS 1.1, move the files as follows:
*.sty→ $TEXMF/tex/generic/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
NB: Here “ε-TeX-ness” is not considered.
\ifptex(or\ifpTeX) if-token Whether the engine is pTeX (including upTeX or pTeX-ng).\ifstrictptex(or\ifstrictpTeX) if-token Whether the engine is pTeX but not upTeX or pTeX-ng.\ifuptex(or\ifupTeX) if-token Whether the engine is upTeX (including pTeX-ng).\ifstrictuptex(or\ifstrictupTeX) if-token Whether the engine is upTeX but not pTeX-ng.\ifnativeuptex(or\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.\RequirepTeXIssues an error if\ifptexfails.\RequireStrictpTeXIssues an error if\ifstrictptexfails.\RequireupTeXIssues an error if\ifuptexfails.\RequireStrictupTeXIssues an error if\ifstrictuptexfails.\RequireNativeupTeXIssues an error if\ifnativeuptexfails.\RequirepTeXngIssues an error if\ifptexngfails.\upTeXguessedversionmathchardef-token The guessed value of upTeX version; given as a 100-folded integer. NB. On version 1.23 or later, the value is correct. NB. On a non-upTeX engine, the value is zero.\RequireupTeXAtLeast{<required>}Issues an error if\upTeXguessedversionis smaller than the given required value.\RequireNativeupTeXAtLeast{<required>}Issues an error either if\upTeXguessedversionis smaller than the given required value or if\ifnativeuptexfails.
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.
\ifstrictplatexif-token Whether pLaTeX is used.\ifstrictuplatexif-token Whether upLaTeX is used.\ifporuplatexif-token Whether pLaTeX or upLaTeX is used.\RequireStrictpLaTeXIssues an error if\ifstrictplatexfails.\RequireStrictupLaTeXIssues an error if\ifstrictuplatexfails.\RequirepOrupLaTeXIssues an error if\ifporuplatexfails.\RequireStrictupLaTeXAtLeast{<required>}Issues an error either if\upTeXguessedversionis smaller than the given required value or if\ifstrictuplatexfails.
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 2.2c 〈2023/04/08〉
- Add
\RequireStrictupLaTeXAtLeast. - Version 2.2b 〈2023/02/25〉
- Add
\ifporuplatexand\RequirepOrupLaTeX.
- Add
- Version 2.2a 〈2023/02/23〉
- Add
\ifstrictplatexand\ifstrictupltex, along with theirRequire...counterparts.
- Add
- Version 2.2 〈2022/04/03〉
- Officialy support
\upTeXguessedversion.- Add
\Require(Native)upTeXAtLeast.
- Add
- Officialy support
- Version 2.1 〈2021/07/01〉
- Adjust for the future version of pTeX.
- Drop an undocumented feature.
- Adjust for the future version of pTeX.
- Version 2.0 〈2019/11/01〉
- Adjust to work better with the new iftex package maintanined by the LaTeX3 Project.
- Now iftex is loaded inside ifptex.
- Provide always all-lowercase
\if...texcommands.
- Provide always all-lowercase
- Support for loading in INI mode.
- Now iftex is loaded inside ifptex.
- Adjust to work better with the new iftex package maintanined by the LaTeX3 Project.
- Version 1.2c 〈2017/10/04〉
- Version 1.2b 〈2017/09/20〉
- Version 1.2a 〈2017/09/15〉
- Version 1.2 〈2017/09/09〉
- Add
\ifstrictupTeXandRequireStrictupTeX.
- Add
- 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).
- Move to a separate bundle.
- Version 0.2 〈2008/03/14〉
- First public version.
- Add
Takayuki YATO (aka. "ZR") https://github.com/zr-tex8r
Download the contents of this package in one zip archive (9.3k).
ifptex – Check if the engine is pTeX or one of its derivatives
The ifptex package is a counterpart of ifxetex, ifluatex, etc. for the ptex engine. The ifuptex package is an alias to ifptex provided for backward compatibility.
| Package | ifptex |
| Repository | https://github.com/zr-tex8r/ifptex |
| Version | 2.2c 2023-04-08 |
| Licenses | MIT License |
| Copyright | 2008–2023 Takayuki YATO |
| Maintainer | Takayuki Yato |
| Contained in | TeX Live as ifptex MiKTeX as ifptex |
| Topics | Japanese Environment query |