6

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}
1
  • 2
    Compile with LuaLaTeX if you have to but IEEE has standards so don't send your article with different fonts. – percusse Aug 31 '14 at 20:10
5

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

2
  • 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 '14 at 7:42
  • @MunHo I don't think I understand why you'd want it. – egreg Sep 1 '14 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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