1

I tried compiling the following example using LuaLaTeX (LuaTeX v0.76/TeX Live 2013):

\documentclass{beamer}

\usepackage{fontspec}
\usepackage[ngerman]{babel}

\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}

\usetheme{Boadilla}

\title{\LaTeX}

\begin{document}

\frame{Test}

\end{document}

However, I get a font warning about Latin Modern Sans in the console/in the log file:

LaTeX Font Info:    Try loading font information for OT1+LatinModernSans(0) on input line 15.
LaTeX Font Info:    No file OT1LatinModernSans(0).fd. on input line 15.

LaTeX Font Warning: Font shape `OT1/LatinModernSans(0)/m/n' undefined
(Font)              using `OT1/cmr/m/n' instead on input line 15.

I don't understand why I get this warning. If I do one of the following, it disappears:

  • Stop using \LaTeX in the \title
  • Remove the \usetheme line (presumably because the title is not used then)
  • Remove the line \setsansfont{Latin Modern Sans}; I don't understand this, doesn't LuaTeX load Latin Modern as a default anyway? Or is it Computer Modern?

I see that the problem seems to be the \LaTeX macro. If I use the hologo package with \hologo{LaTeX}, there is no warning either, but I'd like to understand why this is causing problems and if there's some deeper problem.

Console output:

$ lualatex test.tex
This is LuaTeX, Version beta-0.76.0-2013121407 (rev 4627) 
 restricted \write18 enabled.
(./test.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 33 languages loaded.
(/usr/share/texmf/tex/latex/beamer/base/beamer.cls
(/usr/share/texmf/tex/latex/beamer/base/beamerbasercs.sty)
Document Class: beamer 2012/10/15 development version 3.24 A class for typesetting presentations (rcs-revision 24853e6b98cf)

...

LaTeX Font Warning: Font shape `OT1/LatinModernSans(0)/m/n' undefined
(Font)              using `OT1/cmr/m/n' instead on input line 15.

...

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

...
7
  • 4
    I don't get the complaint with TeX Live 2014 (updated yesterday) but I would still add \usefonttheme{professionalfonts} to stop beamer trying to define fonts itself.
    – cfr
    Aug 17 '14 at 1:55
  • 2
    doesn't LuaTeX load Latin Modern as a default anyway? Or is it Computer Modern? -- The latter: by default the Luatex formats behave like Pdftex and load only CM in the Type1 version. Fontspec, however, loads the LM fonts with a set of definitions for different optical sizes. (See e.g. cat $(kpsewhich eu2lmr.fd).) There is really no point in defining the font yourself again after loading Fontspec. Aug 17 '14 at 7:16
  • @cfr I still get the warning with \usefonttheme{professionalfonts}, but if there's no issue in TeX Live 2014, I guess I'll just wait for that (not in my distribution's repositories yet) to ease my worries.
    – Socob
    Aug 17 '14 at 18:44
  • @phg So just by saying \usepackage{fontspec}, Latin Modern is set as the default font? I didn't find that anywhere in the documentation, but that would be nice. I thought \setmainfont etc. just select the default font and didn't think of it as a "font definition". So there is a difference between just loading fontspec and saying \setsansfont{Latin Modern Sans}?
    – Socob
    Aug 17 '14 at 18:47
  • 4
    This question appears to be off-topic because it is about a not reproducible problem (see comments)
    – egreg
    Nov 16 '14 at 11:25
1

The fact that the warning disappeared if you get rid of \LaTeX from some title, means that the theme has been created either with an old definition of that command, or thet the definition is incompatible with LuaLaTeX.

In facts "someone" specified that some text had to be typeset with the standard Old TeX encoding OT!; normally the default encoding for open type fonts used by Luatex is EU2; since you did not specify any encoding, that old encoding is specified by the theme and it should be necessary to correct the theme (or beamer itself? I doubt it, but who knows...)

Package xpatch could be used to locally patch some existing commands without actually putting one’s hands inside packages.

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