From 350b3e35109171f0edd6fe9d697b91d5e76561f9 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 6 Feb 2022 03:01:17 +0000 Subject: CTAN sync 202202060301 --- macros/generic/iftex/README.md | 3 ++- macros/generic/iftex/iftex.pdf | Bin 214587 -> 232022 bytes macros/generic/iftex/iftex.sty | 38 +++++++++++++++++++++++++++++++++++--- macros/generic/iftex/iftex.tex | 14 +++++++++++--- 4 files changed, 48 insertions(+), 7 deletions(-) (limited to 'macros/generic') diff --git a/macros/generic/iftex/README.md b/macros/generic/iftex/README.md index ec8f5b74cc..eef6975d28 100644 --- a/macros/generic/iftex/README.md +++ b/macros/generic/iftex/README.md @@ -13,7 +13,8 @@ For each supported engine, tests are provided of the form The package (which works with plain TeX as well as LaTeX) has tests for: -eTeX, PDFTeX, XeTeX, LuaTeX, LuaHBTeX, pTeX, upTeX, pTeX-ng, VTeX, Aleph. +eTeX, PDFTeX, XeTeX, LuaTeX, LuaHBTeX, pTeX, upTeX, pTeX-ng, VTeX, Aleph, +TexpadTeX, HiTeX. In addition, an \iftutex test is true for XeTeX and LuaTeX, and diff --git a/macros/generic/iftex/iftex.pdf b/macros/generic/iftex/iftex.pdf index cbb7b48ec5..772a1f8576 100644 Binary files a/macros/generic/iftex/iftex.pdf and b/macros/generic/iftex/iftex.pdf differ diff --git a/macros/generic/iftex/iftex.sty b/macros/generic/iftex/iftex.sty index 8306f8663a..02b3d13c62 100644 --- a/macros/generic/iftex/iftex.sty +++ b/macros/generic/iftex/iftex.sty @@ -30,7 +30,7 @@ % ProvidesPackage declaration in LaTeX \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else - \ProvidesPackage{iftex}[2020/03/06 v1.0d TeX engine tests] + \ProvidesPackage{iftex}[2022/02/03 v1.0f TeX engine tests] \fi % Save @ catcode, to restore at end, not needed in LaTeX. @@ -88,7 +88,10 @@ \IFTEX@protected\def\RequireAlephTeX{\IFTEX@Require\ifalephtex{Aleph}\fi} % tutex == has \Umathchardef == XeTeX or Lua(HB)TeX currently \IFTEX@protected\def\RequireTUTeX{\IFTEX@Require\iftutex{LuaTeX or XeTeX}\fi} - +% TeXpad TeX +\IFTEX@protected\def\RequireTexpadTeX{\IFTEX@Require\iftexpadtex{TexpadTeX}\fi} +% HiTeX/HINT +\IFTEX@protected\def\RequireHINT{\IFTEX@Require\ifhint{HINT}\fi} % As a matter of policy over-write any existing \if*tex macro and set % by the tests here. @@ -210,7 +213,32 @@ \fi \IFTEX@let{TUTeX}{tutex} -% Output mode + +% texpadtex +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname TexpadTeXMode\endcsname\relax + \IFTEX@let{texpadtex}{false} +\else + \IFTEX@let{texpadtex}{true} + \ifcase\TexpadTeXMode\relax + % This is 8 bit mode + \or + \IFTEX@let{tutex}{true} + \fi +\fi +\IFTEX@let{TexpadTeX}{texpadtex} + +% HiTeX +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname HINTversion\endcsname\relax + \IFTEX@let{hint}{false} +\else + \IFTEX@let{hint}{true} +\fi +\IFTEX@let{HINT}{hint} + + +% Output mode % declare as if with \newif \def\pdftrue{\let\ifpdf\iftrue} \def\pdffalse{\let\ifpdf\iffalse} @@ -228,6 +256,10 @@ end \ifnum\OpMode=3 % \pdftrue \fi +\else + \iftexpadtex + \pdftrue + \fi \fi \else \ifnum\pdfoutput>0 % diff --git a/macros/generic/iftex/iftex.tex b/macros/generic/iftex/iftex.tex index 8e13546e77..6e0743684f 100644 --- a/macros/generic/iftex/iftex.tex +++ b/macros/generic/iftex/iftex.tex @@ -22,7 +22,7 @@ \section{Introduction} This original \textsf{iftex} was written as part of the \textsf{bidi} -collection (by the Persian TeX Group / Vafa Khalighi) +collection (by the Persian TeX Group / Vafa Khalighi) and provided checks for whether a document was being processed with PDF\TeX, or Xe\TeX, or Lua\TeX. This version recodes the package and incorporates similar tests from the \textsf{ifetex} @@ -33,7 +33,7 @@ Yato. For each \TeX\ variant engine supported two commands are provided: \begin{itemize} -\item +\item a conditional, \verb|\iffootex| that is true if the \textsf(footex) engine (or a compatible extension) is being used. @@ -119,7 +119,13 @@ true for Lua\TeX\ and Xe\TeX, allowing constructs such as \usepackage{newtxtext,newtxmath} \fi \end{verbatim} - +\item[\cs{iftexpadtex}, \cs{ifTexpadTeX}] +True if Texpad\TeX\ is in use. Please note that Texpad\TeX\ can run in two +modes, one which uses Unicode and native fonts internally (similar to +Xe\TeX\ and Lua\TeX), and one which uses 8-bit codepages internally (similar to +PDF\TeX). This can be determined using \cs{iftutex}. +\item[\cs{ifhint}, \cs{ifHINT}] +True if Hi\TeX\ (HINT output format) is in use. \end{description} \section{Requiring specific engines} @@ -139,6 +145,8 @@ with a suitable engine, and stops with an error message if not. \item[\cs{RequireVTeX}] \item[\cs{RequireAlephTeX}] \item[\cs{RequireTUTeX}] +\item[\cs{RequireTexpadTeX}] +\item[\cs{RequireHINT}] \end{description} -- cgit v1.2.3