1

I'm trying to typeset this code with LuaLaTeX:

\documentclass{article}
\usepackage[greek]{babel}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Gentium Plus}
\parindent=0pt
\begin{document}
Α α Α α
Β β  Β β
Γ γ  Γ γ
Δ δ  Δ δ
Ε ε  Ε ε
Ζ ζ  Ζ ζ
Η η  Η η
Θ θ  Θ θ
Ι ι  Ι ι
Κ κ  Κ κ
Λ λ  Λ λ
Μ μ  Μ μ
Ν ν  Ν ν
Ξ ξ  Ξ ξ
Ο ο  Ο ο
Π π  Π π
Ρ ρ  Ρ ρ
Σ σ  Σ σ
Τ τ  Τ τ
Υ υ  Υ υ
Φ φ  Φ φ
Χ χ  Χ χ
Ψ ψ  Ψ ψ
Ω ω  Ω ω
\end{document}

However, I get this warning:

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

and an empty page (except for the page number at the bottom). (I'm using Gentium Plus here, but other fonts I've tested give me the same error.)

If I comment out the second line from above (\usepackage[greek]{babel}) everything works fine.

Any ideas on what's going on here?

(I'm using LuaTeX, Version 0.95.0 (TeX Live 2016) on MacTeX 2016.)

7
  • Does it work with polyglossia? \usepackage{polyglossia} and \setmainlanguage{greek}
    – MaxNoe
    Commented Dec 15, 2016 at 17:07
  • I don't think that babel-greek supports LuaLaTeX (yet).
    – egreg
    Commented Dec 15, 2016 at 17:08
  • @MaxNoe Yes, it works. But I thought I shouldn't use polyglossia with LuaLaTeX.
    – NVaughan
    Commented Dec 15, 2016 at 17:20
  • @egreg OK. However, isn't the test-unicode-greek.tex file (from babel-greek) supposed to be compiled with LuaLaTeX?
    – NVaughan
    Commented Dec 15, 2016 at 17:22
  • 2
    Polyglossia is also for lualatex and I use it exclusively since at least three years (for german and english, not greek).
    – MaxNoe
    Commented Dec 16, 2016 at 9:00

1 Answer 1

4

It works fine if you load fontspec before babel. The greek module checks the active font encoding.

\documentclass{article}
\usepackage{fontspec}
\usepackage[greek]{babel}

\setmainfont[Ligatures=TeX]{Gentium Plus}
\parindent=0pt
\begin{document}
Α α Α α
Β β  Β β
Γ γ  Γ γ
Δ δ  Δ δ
Ε ε  Ε ε
Ζ ζ  Ζ ζ
Η η  Η η
Θ θ  Θ θ
Ι ι  Ι ι
Κ κ  Κ κ
Λ λ  Λ λ
Μ μ  Μ μ
Ν ν  Ν ν
Ξ ξ  Ξ ξ
Ο ο  Ο ο
Π π  Π π
Ρ ρ  Ρ ρ
Σ σ  Σ σ
Τ τ  Τ τ
Υ υ  Υ υ
Φ φ  Φ φ
Χ χ  Χ χ
Ψ ψ  Ψ ψ
Ω ω  Ω ω
\end{document}

enter image description here

You must log in to answer this question.

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