LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Thu, 15 May 2008 23:55:37 +0930
text/plain (1616 bytes) , smime.p7s (2446 bytes)
On 15/05/2008, at 11:43 PM, Rainer Schöpf wrote:

> Are your proposing something like this at the beginning of  
> inputenc.sty:
> \ifThisIsXeTeX
>   \switchInputEncodingTo{\optarg}
> \endinput \fi
> ? If so, is there a simple implementation of \ifThisIsXeTeX ?

Pretty much, yes.

The ifxetex package provides \ifxetex (simply by checking for the  
presence of \XeTeXversion).

Here's some code that does approximately the right thing: (intended to  
be a self-contained package in a XeTeX-exclusive search path to  
override the normal inputenc.sty)

   [2008/05/15 v0.1 XeTeX-specific inputenc package]
   Loading a XeTeX-specific package to
   override LaTeX's inputenc package.}
     XeTeX input encoding set to '\CurrentOption' for the rest of^^J%
     \space\space '\jobname' and all subsequent files to be read.^^J%
     This message occured}%
   \XeTeXinputencoding "\CurrentOption"%
   \XeTeXdefaultencoding "\CurrentOption"%

It's not very robust at the moment (i.e., the names XeTeX uses don't  
always map to the inputenc names; see < 
 > for the full list of encoding names) so I'll have to do something  
about that. But that's the general approach.

I'm happy to maintain such a package that's intended to live in tex/ 
xelatex/inputenc.sty if you like; otherwise, it should probably be  
rolled into inputenc.sty proper.

Many thanks,