iftex package

3
The iftex Package https://github.com/persian-tex/iftex Persian TeX Group [email protected] Version 0.2 Contents 1 Introduction 1 2 Loading The Package 1 2.1 Loading The Package in Plain T E X 2 2.2 Loading The Package in L A T E X 2 3 Defined Conditionals 2 3.1 For PDFT E X 2 3.2 For XeT E X 2 3.3 For LuaT E X 2 4 Defined Commands 2 4.1 For PDFT E X 2 4.2 For XeT E X 2 4.3 For LuaT E X 3 1 Introduction This package provides a way to check if a document is being processed with PDFT E X, or XeT E X, or LuaT E X. 2 Loading The Package The package can be loaded in the usual way both in Plain T E X and L A T E X. 1

Upload: tristaloid

Post on 26-Jan-2016

218 views

Category:

Documents


4 download

DESCRIPTION

This package provides a way to check if a document is being processed with PDFTEX, or XeTEX, or LuaTEX.

TRANSCRIPT

Page 1: IfTEX Package

The iftex Package

https://github.com/persian-tex/iftex

Persian TeX [email protected]

Version 0.2

Contents1 Introduction 12 Loading The Package 12.1 Loading The Package in Plain TEX 22.2 Loading The Package in LATEX 23 Defined Conditionals 23.1 For PDFTEX 23.2 For XeTEX 23.3 For LuaTEX 24 Defined Commands 24.1 For PDFTEX 24.2 For XeTEX 24.3 For LuaTEX 3

1 Introduction

This package provides a way to check if a document is being processed with PDFTEX,or XeTEX, or LuaTEX.

2 Loading The Package

The package can be loaded in the usual way both in Plain TEX and LATEX.

1

Page 2: IfTEX Package

2.1 Loading The Package in Plain TEX

\input iftex.sty

2.2 Loading The Package in LATEX

\usepackage{iftex}

3 Defined Conditionals

3.1 For PDFTEX

\ifPDFTeX

⟨material for PDFTEX ⟩\else

⟨material not for PDFTEX ⟩\fi

3.2 For XeTEX

\ifXeTeX

⟨material for XeTEX ⟩\else

⟨material not for XeTEX ⟩\fi

3.3 For LuaTEX

\ifLuaTeX

⟨material for LuaTEX ⟩\else

⟨material not for LuaTEX ⟩\fi

4 Defined Commands

4.1 For PDFTEX

\RequirePDFTeX

This command tests for PDFTEX use and throws an error if a different engine isbeing used.

4.2 For XeTEX

\RequireXeTeX

This command tests for XeTEX use and throws an error if a different engine is beingused.

2

Page 3: IfTEX Package

4.3 For LuaTEX

\RequireLuaTeX

This command tests for LuaTEX use and throws an error if a different engine isbeing used.

3