diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-05 23:21:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-05 23:21:09 +0000 |
commit | 9b5e953d3b9474631ef0f47d624224e3840f14d8 (patch) | |
tree | 7a8b54e34c21cc892b8f3d6980fbfcccfc14ae2b /Master/texmf-dist/tex/generic/iftex | |
parent | c7ab6260cbd5ecf7c748abf56df5d3a34ac8e70d (diff) |
new generic package iftex (5apr10)
git-svn-id: svn://tug.org/texlive/trunk@17720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/iftex')
-rw-r--r-- | Master/texmf-dist/tex/generic/iftex/iftex.sty | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/iftex/iftex.sty b/Master/texmf-dist/tex/generic/iftex/iftex.sty new file mode 100644 index 00000000000..4a6407df6a2 --- /dev/null +++ b/Master/texmf-dist/tex/generic/iftex/iftex.sty @@ -0,0 +1,94 @@ +%% +%% This is file `iftex.sty', + +%% +%% __________________________________ +%% Copyright © 2010 Vafa Khalighi +%% +%% License information appended. +%% +%% +\csname iftexloaded\endcsname +\let\iftexloaded\endinput +\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else + \ProvidesPackage{iftex} + [2010/07/25 v0.1 Provides if(tex) conditional for PDFTeX, XeTeX, and LuaTeX] +\fi +\def\RequirePDFTeX{% + \ifPDFTeX\else + \begingroup + \errorcontextlines=-1\relax + \newlinechar=10\relax + \errmessage{^^J + ********************************************^^J + * PDFTeX is required to compile this document.^^J + * Sorry!^^J + ********************************************}% + \endgroup + \fi} +\def\RequireXeTeX{% + \ifXeTeX\else + \begingroup + \errorcontextlines=-1\relax + \newlinechar=10\relax + \errmessage{^^J + ********************************************^^J + * XeTeX is required to compile this document.^^J + * Sorry!^^J + ********************************************}% + \endgroup + \fi} +\def\RequireLuaTeX{% + \ifLuaTeX\else + \begingroup + \errorcontextlines=-1\relax + \newlinechar=10\relax + \errmessage{^^J + ********************************************^^J + * LuaTeX is required to compile this document.^^J + * Sorry!^^J + ********************************************}% + \endgroup + \fi} +\expandafter\ifx\csname ifPDFTeX\endcsname\relax\else + \expandafter\endinput +\fi +\expandafter\ifx\csname ifXeTeX\endcsname\relax\else + \expandafter\endinput +\fi +\expandafter\ifx\csname ifLuaTeX\endcsname\relax\else + \expandafter\endinput +\fi +\newif\ifPDFTeX +\expandafter\ifx\csname pdfmatch\endcsname\relax + \PDFTeXfalse +\else + \PDFTeXtrue +\fi +\newif\ifXeTeX +\expandafter\ifx\csname XeTeXinterchartoks\endcsname\relax + \XeTeXfalse +\else + \XeTeXtrue +\fi +\newif\ifLuaTeX +\expandafter\ifx\csname directlua\endcsname\relax + \LuaTeXfalse +\else + \LuaTeXtrue +\fi +%% +%% Copyright © 2010 by Vafa Khalighi <vafakh84@gmail.com> +%% +%% Distributable under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) +%% by Vafa Khalighi. +%% +%% +%% +%% +%% +%% End of file `iftex.sty'. |