From 8cbde0b31f3f95aa4fbed45a5f4f0c7c276140e7 Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Sat, 25 Nov 2006 01:38:56 +0000 Subject: update. git-svn-id: svn://tug.org/texlive/trunk@2512 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty | 45 +++++++++++++++++------ 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'Master/texmf-dist/tex/generic') 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 % % 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 -- cgit v1.2.3