Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to use the documentclass IEEEtran with XeLaTeX. It all seems to work fine (I load the fonts TeX Gyre Termes Heros, Cursor with fontspecs instead of the standard Times, Helvetica and Courier), except for the command \IEEEPARstart, which is used to create the drop cap for the first paragraph. It gives the following error message:

Font \@IEEEPARstartsubfont=""TeX at "" not loadable: Metric (TFM) file or installed font not found. ^^I\IEEEPARstart{T}{he}

I tried to substitute this command with the one from the lettrine package, but the drop cap does not look the same as the one that \IEEEPARstart should produce.

How can I rewrite the \IEEEPARstart command to work in XeLaTeX?

MWE:

\documentclass[journal, a4paper]{IEEEtran}

\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}

\begin{document}
    \IEEEPARstart{T}{he}
\end{document}
share|improve this question
1  
Compile with LuaLaTeX if you have to but IEEE has standards so don't send your article with different fonts. –  percusse Aug 31 at 20:10

1 Answer 1

up vote 5 down vote accepted

Without any warranty:

\documentclass[journal, a4paper]{IEEEtran}

\usepackage{etoolbox}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}
\setsansfont{TeX Gyre Heros}
\setmonofont{TeX Gyre Cursor}

\usepackage{lipsum} % just for the example


\makeatletter
\def\CHANGEDGETFIRSTWORD"#1" #2\relax{"#1" #2}
\patchcmd{\IEEEPARstart}
  {\@IEEEPARstartFONTSTYLE}
  {\let\@IEEEPARstartGETFIRSTWORD\CHANGEDGETFIRSTWORD\@IEEEPARstartFONTSTYLE}
  {}{}
\makeatother

\begin{document}

\IEEEPARstart{T}{he} \lipsum[2]

\end{document}

On the other hand, if you're submitting a paper to IEEE, don't change the font settings.

enter image description here

share|improve this answer
    
Nice! A natural follow-up question is how to use the standard fonts together with fontspec. I posted it as a new question here. –  MunHo Sep 1 at 7:42
    
@MunHo I don't think I understand why you'd want it. –  egreg Sep 1 at 8:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.