[XeTeX] How can I use IEEEtran class with XeLaTeX?

Maxim Cournoyer maxim.cournoyer at gmail.com
Mon Jan 31 17:29:30 CET 2011



> On 2011-01-31 13:52, Shrisha Rao wrote:
> > El ene 31, 2011, a las 4:02 a.m., Ross Moore escribió:
> > 
> >> The IEEE class file is not aware of the existence of XeTeX.
> > 
> > The class file is inanimate, it could be changed, but more to the point, I don't think the editorial staff who prepare IEEE Transactions with post-acceptance papers are aware/accepting of it.  Not to badmouth the IEEE, which is a fine professional society, but my experience with mainstream journals in general is that their staffs are generally not very receptive to XeTeX and other new-fangled tools.  One could get away with using XeTeX with IEEE or other *conference* papers where only a final properly formatted PDF is required for the proceedings, but anytime a source file has to be supplied, using its features will only slow down the production process and delay the appearance of your paper.
> 
> Nevertheless, keeping up promoting XeTeX at IEEE Transactions might in
> the long term turn out to be fruitful.
> 
> > Regards,
> > 
> > Shrisha Rao


I agree that promoting XeTeX at IEEE is a good thing, because it would allow anyone to use the IEEE template,
whichever language they want to use easily.

Just to be clear, in the present case, I'm _not_ planning to submit a paper for acceptance at the IEEE;
What I need to do is to write an assignment in the IEEE format for my university. It must be written in french.

Most people will use Word and the .doc IEEE template file to do it, but since I prefer LaTeX, I was trying to get the 
IEEE template to work with special french characters (éàïç...).XeLaTeX seemed like a natural choice to accomplish this.

But now, with your kind inputs (thanks to Ross & Peter), I realize that it's a more daunting task than I would have liked.
My last attempt was to try to just make plain LaTeX happy with my special latin characters, so I added:

        \usepackage[utf8x]{inputenc}

to my bare_jrnl.tex file (and commented the xltxtra, polyglossia and custom fonts stuff I had previously tried).

This failed encountering a french quote (LaTeX Error: Command \guillemotleft unavailable in encoding OT1). With some research, 
I found that it was due to OT1 lacking extended mappings of glyphes, and that T1 was newer and better in this regard.
To fix this, I added the following line (before the inputenc command):

        \usepackage[T1]{fontenc}
        

This failed with a:

        Package utf8x Error: MalformedUTF-8sequence.

Then, out of luck, I tried changing my compiler from xelatex to pdflatex, and bingo! it worked! :)

So, while not a XeLaTeX solution, my solution to the problem of using the IEEEtran class with french characters
could be summarized as follow:

1) Grab an example file such as "bare_jrnl.tex" here: http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
2) In the preamble of this file, add the following commands:

        % Add support to french characters & typography rules
        \usepackage[T1]{fontenc}
        \usepackage[utf8x]{inputenc}
        \usepackage[francais]{babel}
        
        % Hack to make babel happy (see: http://www.michaelshell.org/tex/ieeetran/)
        \makeatletter
        \def\markboth#1#2{\def\leftmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#1}}%
        \def\rightmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#2}}}
        \makeatother
        
        % French translation for headers and section names.
        \renewcommand{\contentsname}{Sommaire}
        \renewcommand{\listfigurename}{Liste des figures}
        \renewcommand{\listtablename}{Liste des tables}
        \renewcommand{\refname}{Références}
        \renewcommand{\indexname}{Index}
        \renewcommand{\figurename}{Fig.}
        \renewcommand{\tablename}{TABLE}
        %\@IEEEcompsocconfonly{\def\figurename{Figure}\def\tablename{Table}}
        \renewcommand{\partname}{Partie}
        \renewcommand{\appendixname}{Annexe}
        \renewcommand{\abstractname}{Résumé}
        % IEEE specific names
        \renewcommand{\IEEEkeywordsname}{Mots clés}
        \renewcommand{\IEEEproofname}{Preuve}

3) And don't forget to compile your document with "pdflatex" instead of "xelatex", else you will get an error about malformed UTF8 sequence.

Attached is my sample file which compiles fine (and the resulting pdf). There is no need to modify the IEEEtran.cls. Enjoy!

Thanks to everyone!

Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110131/288cd2ef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: face-smile.png
Type: image/png
Size: 873 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20110131/288cd2ef/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bare_jrnl.pdf
Type: application/pdf
Size: 52094 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20110131/288cd2ef/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bare_jrnl.tex
Type: text/x-tex
Size: 5045 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20110131/288cd2ef/attachment-0001.bin>


More information about the XeTeX mailing list