blob: 4a6407df6a296687779f3d664d97e5cab9b85660 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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'.
|