diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2006-11-25 01:38:56 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2006-11-25 01:38:56 +0000 |
commit | 8cbde0b31f3f95aa4fbed45a5f4f0c7c276140e7 (patch) | |
tree | f73b76b308223ed243899823c38898926b7750a3 /Master/texmf-dist/tex | |
parent | 956f54bed49e9e056ccb6ec59fce0aa5af4c2633 (diff) |
update.
git-svn-id: svn://tug.org/texlive/trunk@2512 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty b/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty index 82ce9869c3c..d95d2a8d6f5 100644 --- a/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty +++ b/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty @@ -1,35 +1,58 @@ % Copyright 2006 by Will Robertson <wspr81@gmail.com> % % Distributable under the LaTeX Project Public License, -% version 1.3b or higher (your choice). The latest version of +% 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. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% The ifxetex package +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% The ifxetex package, version 0.3 %% %% Usage: LaTeX - \usepackage{ifxetex} %% Plain - \input ifxetex.sty %% %% Function: Provides the \ifxetex boolean for testing %% whether XeTeX is being used for typesetting. -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% Provides the \RequireXeTeX command which throws +%% an error if XeTeX is not the engine in use. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% It's naughty, but I assume eTeX extensions here. -% If a user has this package, then they're using eTeX. -% (My assumption.) +% Ensure loading a single time only +\csname ifxetexloaded\endcsname +\let\ifxetexloaded\endinput -\ifdefined\ProvidesPackage +% Declare ourselves to LaTeX +\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else \ProvidesPackage{ifxetex} - [2006/06/12 v0.1 Provides ifxetex condition] + [2006/08/21 v0.3 Provides ifxetex conditional] \fi -\unless\ifdefined\ifxetex +% Create, if necessary, the \ifxetex conditional +\expandafter\ifx\csname ifxetex\endcsname\relax \newif\ifxetex \fi -\ifdefined\XeTeXversion +% Set \ifxetex accordingly +\expandafter\ifx\csname XeTeXrevision\endcsname\relax + \xetexfalse +\else \xetextrue \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}
\ No newline at end of file |