summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty
blob: d5d3e814e0c663216b5227426050e43d9aa51f36 (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
%% LaTeX2e file `ifxetex.sty'
%% generated by the `filecontents' environment
%% from source `ifxetex' on 2008/09/30.
%%
% \iffalse
% Copyright 2006-2008 by Will Robertson <wspr81@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 Will Robertson.
% \fi

% Ensure loading a single time only
\csname ifxetexloaded\endcsname
\let\ifxetexloaded\endinput

% Declare ourselves to \LaTeX
\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
  \ProvidesPackage{ifxetex}
    [2008/09/18 v0.4 Provides ifxetex conditional]
\fi

% Create, if necessary, the \cmd\ifxetex\ conditional
\expandafter\ifx\csname ifxetex\endcsname\relax
  \newif\ifxetex
\fi

% Set \cmd\ifxetex\ accordingly
\expandafter\ifx\csname XeTeXrevision\endcsname\relax
  \xetexfalse
\else
  \xetextrue
\fi

% For \XeTeX-exclusive packages
\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}