4

I am trying to compile a long document in which I must add a couple of paragraphs with text in Ancient Greek, to be compiled with XeLaTeX.

The way I am doing this now is

\usepackage[utf8]{inputenc}
\usepackage[polutonikogreek,english]{babel}
\newcommand{\greek}[1]{{\selectlanguage{polutonikogreek}#1}}

and then I have \greek{βάραθρον} etc.

However, this is not producing any output with XeLaTeX. Using pdfLaTeX I do get the words in Ancient Greek in the text.

I have also noticed that a few words in French and Spanish I have don't show up properly either, regardless on whether I add spanish and french to the babel options.

Unfortunately I must use XeLaTeX because of some complicated commands I have in the text.

2
  • 4
    If you're using XeLaTeX, you should not be loading the inputenc package, at all. Instead, you should be loading the fontspec package and setting up the main text font via a \setmainfont directive.
    – Mico
    Sep 25, 2016 at 15:59
  • 1
    For Greek, I like GFS Artemisia by the Greek Font Society, which exists in OTF (for XeTeX and LuaTeX) and in the T1 encoding. If you have TeX Live, try texdoc gfsartemisia.
    – jon
    Sep 25, 2016 at 20:58

2 Answers 2

8

With XeLaTeX you don't really need special support for Greek, if all you need are isolated words and don't care about hyphenation.

In case you want correct hyphenation for ancient Greek, you can use a main font that has support for the language, or choose a different one.

However, babel doesn't offer XeLaTeX support for ancient Greek, so you need polyglossia.

\documentclass{article}

\usepackage{polyglossia}

\setmainlanguage{english}
\setotherlanguage[variant=ancient]{greek}
\setmainfont{Libertinus Serif}

\begin{document}

The Greek word \textgreek{βάραθρον} means `gulf', `pit' or `cleft'.

%% One of the following declarations should go in the preamble;
%% it is used here just to show the effect; choose the font
%% you like the most, there are several others

\newfontfamily{\greekfont}[Scale=MatchUppercase]{GFS Porson}

The Greek word \textgreek{βάραθρον} means `gulf', `pit' or `cleft'.

\newfontfamily{\greekfont}[Scale=MatchUppercase]{GFS Bodoni}

The Greek word \textgreek{βάραθρον} means `gulf', `pit' or `cleft'.

\newfontfamily{\greekfont}[Scale=MatchUppercase]{Old Standard}

The Greek word \textgreek{βάραθρον} means `gulf', `pit' or `cleft'.

\end{document}

enter image description here

0
7

The problem you're having is that you're applying the pdfLaTeX approach to XeLaTeX

\usepackage[utf8]{inputenc}

Is not necessary with XeLaTeX.

I have chosen to use polyglossia over babel.

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage[variant=ancient]{greek}
\newfontfamily\greekfont[Script=Greek]{Galatia SIL}
\usepackage{lipsum}

\begin{document}

\lipsum[1]

\textgreek{βάραθρον}

\lipsum[2]

\end{document}

enter image description here

Galatia SIL is a fine Greek font easily available from SIL.

You must log in to answer this question.

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