diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/iftex/README.md | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/iftex/iftex.pdf | bin | 214587 -> 232022 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/iftex/iftex.tex | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/iftex/iftex.sty | 38 |
4 files changed, 48 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/generic/iftex/README.md b/Master/texmf-dist/doc/generic/iftex/README.md index ec8f5b74cce..eef6975d28e 100644 --- a/Master/texmf-dist/doc/generic/iftex/README.md +++ b/Master/texmf-dist/doc/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/Master/texmf-dist/doc/generic/iftex/iftex.pdf b/Master/texmf-dist/doc/generic/iftex/iftex.pdf Binary files differindex cbb7b48ec5f..772a1f8576e 100644 --- a/Master/texmf-dist/doc/generic/iftex/iftex.pdf +++ b/Master/texmf-dist/doc/generic/iftex/iftex.pdf diff --git a/Master/texmf-dist/doc/generic/iftex/iftex.tex b/Master/texmf-dist/doc/generic/iftex/iftex.tex index 8e13546e770..6e0743684f2 100644 --- a/Master/texmf-dist/doc/generic/iftex/iftex.tex +++ b/Master/texmf-dist/doc/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} diff --git a/Master/texmf-dist/tex/generic/iftex/iftex.sty b/Master/texmf-dist/tex/generic/iftex/iftex.sty index 8306f8663a5..02b3d13c62d 100644 --- a/Master/texmf-dist/tex/generic/iftex/iftex.sty +++ b/Master/texmf-dist/tex/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 % |