0

I have recently acquired one of those very complete OTF font families (Latin / Greek / Cyrillic, with small caps and many ligatures). I managed to get it work with LuaLaTeX thanks to fontspec, but when I try to use it in beamer, nothing happens (I get the standard beamer sans serif fonts). Here is my (minimal) code which doesn't work:

\documentclass{beamer}
\usepackage[no-math]{fontspec}
\usepackage{luatextra}
\usefonttheme{professionalfonts}
\usetheme{AnnArbor}
\usecolortheme{crane}
\setmainfont[
    Path           = /hom/yannis/texmf/cours/stats/,
    Extension      = .otf,
    Ligatures      = TeX,
    BoldFont       = FedraSerifProABold,
    ItalicFont     = FedraSerifProABookItalic,
    BoldItalicFont = FedraSerifProABoldItalic
]{FedraSerifProABook}
\begin{document}
\begin{frame}Bonjour Καλημέρα καὶ τῷ Θεῷ Δόξα\end{frame}
\end{document}

The font is OK since exactly the same code but with article class and without the beamer-specific commands and environments works perfectly. So, what am I doing wrong?

My luatex version is beta-0.70.2-2012062819 (TeX Live 2012) (format=lualatex 2013.6.6).

2
  • 1
    Beamer use by default the sans serif family, so you should use \setsansfont Commented Apr 4, 2016 at 8:51
  • Thanks, it works! It was as simple as that, I should have figured it out. Is there a way to use the Latin and Greek glyphs of the fonts for mathematical symbols?
    – yannis
    Commented Apr 4, 2016 at 9:02

1 Answer 1

1

(NB: Since I am new here and not allowed to comment, I put my comment into this “answer”, well knowing that it is not really an answer. Sorry about that.)

In her comment, Ulrike Fischer already gave the answer to your initial question: since Beamer use the sans serif family by default, you should declare your font as the sans font, not the main font, using \setsans. As for selecting math fonts, you me look at this question.

4
  • Yes Ulrike's solution works (it's that simple, but you have to figure it out). As for math, I used the mathastext package, but it doesn't use Greek letters as symbols. Has nobody thought about simply taking Greek letters out of the Greek text part of the font, and use them with \alpha, \beta, etc.?
    – yannis
    Commented Apr 4, 2016 at 11:47
  • I personally don't use lualatex, so cannot say much about that. But for XeLaTeX, there is the mathspec package which allows to use the Greek glyphs from a font as the Greek symbols in math (and mix and match different fonts for digits, Latin, Greek ands symbols in math). But I don't think it will work with lualatex.
    – Daniel
    Commented Apr 4, 2016 at 12:07
  • I redefined all letters like \def\alpha{\ensuremath{\text{\textit{α}}}}, this works just fine.
    – yannis
    Commented Apr 4, 2016 at 14:36
  • But I guess that messes up math spacing, when you have, say, \alpha\beta, or doesn't it?
    – Daniel
    Commented Apr 4, 2016 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .