diff options
author | Karl Berry <karl@freefriends.org> | 2008-09-30 00:05:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-09-30 00:05:18 +0000 |
commit | 0043499a7e626619377185204ab8269c9a8ac8cc (patch) | |
tree | c2f4c935535a939a0fe70474145a056ea1cf73b3 | |
parent | add0cf86e889459ca041543cfe8e6c816f3e50f0 (diff) |
ifxetex update (29sep08)
git-svn-id: svn://tug.org/texlive/trunk@10792 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/generic/ifxetex/README | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/ifxetex/README.txt | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/ifxetex/ifxetex.pdf | bin | 0 -> 66547 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/ifxetex/ifxetex.tex | 194 | ||||
-rw-r--r-- | Master/texmf-dist/source/xelatex/ifxetex/ifxetex.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty | 38 |
6 files changed, 240 insertions, 29 deletions
diff --git a/Master/texmf-dist/doc/generic/ifxetex/README b/Master/texmf-dist/doc/generic/ifxetex/README index c5a668f2a61..1c2ed5a676b 100644 --- a/Master/texmf-dist/doc/generic/ifxetex/README +++ b/Master/texmf-dist/doc/generic/ifxetex/README @@ -1,13 +1,17 @@ ------------------------ -THE IFXETEX PACKAGE v0.3 +THE IFXETEX PACKAGE v0.4 -This very simple package, for both Plain and LaTeX, defines -the \ifxetex boolean for testing whether the TeX-variant -XeTeX is being used for typesetting. +This very simple package, for both Plain TeX and LaTeX, +defines the \ifxetex boolean for testing whether XeTeX +is being used for typesetting. Also provides the \RequireXeTeX command which throws an error if XeTeX is not the engine in use. --------------- +To extract the package from the source file "ifxetex.tex", +execute `latex ifxetex.ins`. Executing `xelatex ifxetex.tex` +compiles the documentation. + +------------------- Will Robertson -2006
\ No newline at end of file +Copyright 2006-2008 diff --git a/Master/texmf-dist/doc/generic/ifxetex/README.txt b/Master/texmf-dist/doc/generic/ifxetex/README.txt new file mode 100644 index 00000000000..a2c76933483 --- /dev/null +++ b/Master/texmf-dist/doc/generic/ifxetex/README.txt @@ -0,0 +1,17 @@ +------------------------ +THE IFXETEX PACKAGE v0.4 + +This very simple package, for both Plain TeX and LaTeX, +defines the \ifxetex boolean for testing whether XeTeX +is being used for typesetting. + +Also provides the \RequireXeTeX command which throws +an error if XeTeX is not the engine in use. + +To extract the package from the source file "ifxetex.tex", +execute `latex ifxetex.ins`. Executing `xelatex ifxetex.tex` +compiles the documentation and generates this README. + +------------------- +Will Robertson +Copyright 2006-2008 diff --git a/Master/texmf-dist/doc/generic/ifxetex/ifxetex.pdf b/Master/texmf-dist/doc/generic/ifxetex/ifxetex.pdf Binary files differnew file mode 100644 index 00000000000..95c61a856dc --- /dev/null +++ b/Master/texmf-dist/doc/generic/ifxetex/ifxetex.pdf diff --git a/Master/texmf-dist/doc/generic/ifxetex/ifxetex.tex b/Master/texmf-dist/doc/generic/ifxetex/ifxetex.tex new file mode 100644 index 00000000000..5b0905f52c7 --- /dev/null +++ b/Master/texmf-dist/doc/generic/ifxetex/ifxetex.tex @@ -0,0 +1,194 @@ +\RequirePackage{filecontents} +\begin{filecontents*}{README.txt} +------------------------ +THE IFXETEX PACKAGE v0.4 + +This very simple package, for both Plain TeX and LaTeX, +defines the \ifxetex boolean for testing whether XeTeX +is being used for typesetting. + +Also provides the \RequireXeTeX command which throws +an error if XeTeX is not the engine in use. + +To extract the package from the source file "ifxetex.tex", +execute `latex ifxetex.ins`. Executing `xelatex ifxetex.tex` +compiles the documentation and generates this README. + +------------------- +Will Robertson +Copyright 2006-2008 +\end{filecontents*} +%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5 + +\begin{filecontents}{ifxetex.sty} +% \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} +\end{filecontents} +%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5 + + + +% Conditionally compile the documentation & generate the .ins file: +\providecommand\asyfigCompile{Y} +\makeatletter +\if\asyfigCompile N + \expandafter\@@end +\fi + + + + +\begin{filecontents*}{ifxetex.ins} +%&latex +\def\asyfigCompile{N} +\input ifxetex.tex +\csname@@end\endcsname +\end{filecontents*} + + + + +\makeatletter +\documentclass{article} + +\usepackage[it,medium]{titlesec} + +\usepackage{bigfoot,ifthen,xcolor} +\usepackage[colorlinks,linktocpage]{hyperref} + +\usepackage{gmdoc} +\usepackage{gmverb} +\dekclubs +\stanzaskip=\bigskipamount +\CodeSpacesGrey + +\usepackage{tocloft,varwidth} +\setcounter{tocdepth}{1} +\def\tocwidthA{0.45} +\def\tocwidthB{0.45} +\def\cftpartfont{\scshape} +\def\cftsecfont{\small} +\cftbeforesecskip=0pt +\def\cftpartleader{} +\def\cftpartafterpnum{\cftparfillskip} +\def\cftsecleader{} +\def\cftsecafterpnum{\cftparfillskip} + +\let\pkg\textsf +\def\pkgopt#1{\texttt{[#1]}} + +\def\PDF{\textsc{pdf}} +\def\PS{\textsc{ps}} +\def\DVI{\textsc{dvi}} +\def\EPS{\textsc{eps}} + +\usepackage{amsmath,listings} +\lstset{basicstyle=\ttfamily,columns=fullflexible} + +\usepackage{array,xltxtra} +\setmainfont{Georgia} +\setsansfont[Scale=MatchLowercase]{Helvetica} +\setmonofont[Scale=MatchLowercase]{Monaco} +\frenchspacing + +\GetFileInfo{ifxetex.sty} +\begin{document} + +\title{The \pkg{ifxetex} package} +\author{% + \normalsize Will Robertson\footnote{\texttt{wspr81@gmail.com}}} +\date{\fileversion\qquad\filedate} + +\maketitle + +\section{User documentation} + +This package provides a way to check if a document is being processed with \XeTeX. It may be loaded with + +\bigskip +\begin{tabular}{l@{\quad}l} +{|\usepackage{ifxetex}|} & for \LaTeX, or \\ +{|\input ifxetex.sty|} & for Plain \TeX. +\end{tabular} +\bigskip + +\noindent +This defines the conditional \cmd\ifxetex\ that is used in the standard way: + +\bigskip +|\ifxetex|\par +\hspace{2em}\meta{material for \XeTeX}\par +|\else|\par +\hspace{2em}\meta{material not for \XeTeX}\par +|\fi| +\bigskip + +\noindent +Users of \LaTeX's \pkg{ifthen} package can also use it as |\boolean{xetex}|: + +\bigskip +|\ifthenelse{ \boolean{xetex} }{|\texttt{\char`\%}\par +\hspace{2em}\meta{material for \XeTeX}\par +|}{|\texttt{\char`\%}\par +\hspace{2em}\meta{material not for \XeTeX}\par +|}| +\bigskip + +\noindent +Finally, the |\RequireXeTeX| command tests for \XeTeX\ use and +throws an error if a different engine is being used. This is used +for packages like \pkg{fontspec} that take advantage of \XeTeX's new +features and cannot be used otherwise. + + +\clearpage +\parindent=0pt +\section{Implementation} +\DocInput{ifxetex.sty} + + +\end{document} diff --git a/Master/texmf-dist/source/xelatex/ifxetex/ifxetex.ins b/Master/texmf-dist/source/xelatex/ifxetex/ifxetex.ins new file mode 100644 index 00000000000..2978784a08a --- /dev/null +++ b/Master/texmf-dist/source/xelatex/ifxetex/ifxetex.ins @@ -0,0 +1,4 @@ +%&latex +\def\asyfigCompile{N} +\input ifxetex.tex +\csname@@end\endcsname diff --git a/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty b/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty index 1766fd27306..d5d3e814e0c 100644 --- a/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty +++ b/Master/texmf-dist/tex/generic/ifxetex/ifxetex.sty @@ -1,49 +1,41 @@ -% Copyright 2006 by Will Robertson <wspr81@gmail.com> -% +%% 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) +% This work is "maintained" (as per LPPL maintenance status) % by Will Robertson. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% 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. -%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \fi % Ensure loading a single time only \csname ifxetexloaded\endcsname \let\ifxetexloaded\endinput -% Declare ourselves to LaTeX +% Declare ourselves to \LaTeX \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else \ProvidesPackage{ifxetex} - [2006/08/21 v0.3 Provides ifxetex conditional] + [2008/09/18 v0.4 Provides ifxetex conditional] \fi -% Create, if necessary, the \ifxetex conditional +% Create, if necessary, the \cmd\ifxetex\ conditional \expandafter\ifx\csname ifxetex\endcsname\relax \newif\ifxetex \fi -% Set \ifxetex accordingly +% Set \cmd\ifxetex\ accordingly \expandafter\ifx\csname XeTeXrevision\endcsname\relax \xetexfalse \else \xetextrue \fi -% For XeTeX-exclusive packages +% For \XeTeX-exclusive packages \def\RequireXeTeX{% \ifxetex\else \begingroup @@ -55,4 +47,4 @@ * Sorry!^^J ********************************************}% \endgroup - \fi}
\ No newline at end of file + \fi} |