1

I know that IEEEtran is basically pdflatex only. However, I would prefer using lualatex but it gives me a couple of font warnings for this snippet:

\documentclass[conference]{IEEEtran}

%\usepackage[OT1]{fontenc} % does not help
\usepackage{fontspec,mathtools,unicode-math}
\setmainfont{TeX Gyre Termes}


\begin{document}
    bla
\end{document}

the warnings are:

Font shape `TU/ptm/m/n' undefined(Font) using `TU/lmr/m/n' instead
Font shape `TU/ptm/bx/n' undefined(Font) using `TU/ptm/m/n' instead
Font shape `TU/ptm/m/it' undefined(Font) using `TU/ptm/m/n' instead
Font shape `TU/ptm/bx/it' undefined(Font) using `TU/ptm/bx/n' instead

I tried the solutions suggested in How to compile IEEE Access templates with XeLaTeX with fontspec? and Do I need to use \usepackage[T1]{fontenc} if I use lualatex? without success.

Edit: For the conference, only the PDFs are uploaded. No sources are shared with the organizers/IEEE.

  • 2
    the only (or at leat usual) reason to use a publisher class such as ieeetran is for journal publications, and if the journal is using pdftex then submitting an article using fontspec isn't going to work? – David Carlisle Apr 14 at 10:43
  • @DavidCarlisle, its for a conference, I guess they just employ certain font checks that I want to pass :-) – bonanza Apr 14 at 10:43
  • 2
    exactly but if they want to produce the conference proceedings and they use pdftex for that, what can they do with one paper using fontspec? – David Carlisle Apr 14 at 10:45
  • 2
    if they are producing a combined proceedings including all the papers in to a single pdftex run that is trivial if everyone uses the specified document class as you simply ignore the per article preambles and run the articles together. If you supply a luatex-only document it is like supplying a Word document and totally breaks the workflow. It is probably easy to avoid the warning you post, but I would not be surprised if the resulting paper fails any submission guidelines. Oh just saw you said they only want the pdf, odd, in that case my objection doesn't apply. – David Carlisle Apr 14 at 10:50
  • 1
    No if they only want the pdf that's different ... :-) – David Carlisle Apr 14 at 10:52
1

If you want to use the same 8bit fonts as pdftex, but just use luatex (eg to use some Lua features) you can revert to OT1 or T1 before loading the class, eg

\RequirePackage[OT1]{fontenc}
\documentclass[conference]{IEEEtran}


\usepackage{mathtools}


\begin{document}
    bla
\end{document}
  • Thanks so much! It leaves only a single warning if I use \RequirePackage[OT1]{fontenc} before documentclass in my snippet above: Font shape TU/ptm/m/n' undefined(Font) using TU/lmr/m/n' instead – bonanza Apr 14 at 11:01
  • 1
    I get no font warning with the posted example on texlive 2019. I do get one warning Non-PDF special ignored!{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/upd map/pdftex.map}] – David Carlisle Apr 14 at 11:04
  • @DavidCarlisle see my answer, \pdfoutput is not defined. And I see a warning about fonts. – Ulrike Fischer Apr 14 at 11:05
  • True, the warning is due to unicode-math I guess. There any way to still use it? – bonanza Apr 14 at 11:06
  • if you use unicode math you'd need a times-like math font, stix or stix2 I suppose? the warnings are probably just in the setup and don't reflect anything in the actual document as long as you have everything consistently defined by the end of the preamble. – David Carlisle Apr 14 at 11:09
0

The warnings are in the middle of the class loading. The class tries to use a bold and italic font to set some font dimens. Imho you can simply ignore it, fontspec will set its own fontdimens anyway when you load TeX Gyre Termes.

But you should add before \documentclass this so that the class correctly tests for pdf output:

  \let\pdfoutput \outputmode
  • Does that mean that in the final PDF the correct font is used (and the PDF checker used by IEEE won't complain) ? – bonanza Apr 14 at 11:08
  • Depends on what you mean by the "correct font". It will use the texgyretermes-regular.otf and this is certainly not the same font a standard IEEE document uses, so if they check for the font they won't be happy. – Ulrike Fischer Apr 14 at 11:13

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.