4

I'm using XeLaTeX and the polyglossia package to write text in italian and ancient greek.
My problem is that ,when I use e.g. the **CMU Serif** font, the greek text appears correctly, but ,when I change it to **Times New Roman**, some accented greek characters are not shown, although they are included in the font (e.g. in MS Word I see them with Times New Roman selected).
Here is my code:
\documentclass [11pt,a4paper,oneside]{book}

\usepackage{fontspec}                           
\setmainfont{CMU Serif}          % Replaced with "Times New Roman"
\usepackage{polyglossia}                        
\setdefaultlanguage{italian}                    
\setotherlanguage[variant=ancient]{greek}       

\begin{document}

Θουκυδίδης Ἀθηναῖος ξυνέγραψε τὸν πόλεμον τῶν Πελοποννησίων καὶ Ἀθηναίων, ὡς ἐπολέμησαν πρὸς ἀλλήλους, ἀρξάμενος εὐθὺς καθισταμένου καὶ ἐλπίσας μέγαν τε ἔσεσθαι καὶ ἀξιολογώτατον τῶν προγεγενημένων, τεκμαιρόμενος ὅτι ἀκμάζοντές τε ᾖσαν ἐς αὐτὸν ἀμφότεροι παρασκευῇ τῇ πάσῃ καὶ τὸ ἄλλο Ἑλληνικὸν ὁρῶν ξυνιστάμενον πρὸς ἑκατέρους, τὸ μὲν εὐθύς, τὸ δὲ καὶ διανοούμενον. [2] κίνησις γὰρ αὕτη μεγίστη δὴ τοῖς Ἕλλησιν ἐγένετο καὶ μέρει τινὶ τῶν βαρβάρων, ὡς δὲ εἰπεῖν καὶ ἐπὶ πλεῖστον ἀνθρώπων. [3] τὰ γὰρ πρὸ αὐτῶν καὶ τὰ ἔτι παλαίτερα σαφῶς μὲν εὑρεῖν διὰ χρόνου πλῆθος ἀδύνατα ἦν, ἐκ δὲ τεκμηρίων ὧν ἐπὶ μακρότατον σκοποῦντί μοι πιστεῦσαι ξυμβαίνει οὐ μεγάλα νομίζω γενέσθαι οὔτε κατὰ τοὺς πολέμους οὔτε ἐς τὰ ἄλλα.

\end{document}

These are the results:

CMU Serif Times New Roman
CMU Serif Times New Roman

EDIT
I noticed that it appends just on Overleaf, but not on my PC...

2
  • Putting \tracinglostchars=2 near the top of the file will at least pringt out warning messages when a font is missing a character. This should really be the default behavior, instead of silently dropping the character with a line in the .log file about it.
    – Davislor
    Commented Apr 5, 2021 at 0:48
  • 1
    you are not using the same font. the version of times in the mscorefonts collection is older and has fewer characters. the fonts used on windows are not licenced for use on Linux. Commented Apr 5, 2021 at 7:31

1 Answer 1

5

You can use a clone of Times that supports ancient Greek and one is available in TeX Live as Tempora.

\documentclass [11pt,a4paper,oneside]{book}

\usepackage{fontspec}                           
\setmainfont{Tempora}
\usepackage{polyglossia}                        
\setdefaultlanguage{italian}                    
\setotherlanguage[variant=ancient]{greek}       

\begin{document}

Il testo è in un clone di Times.

\begin{otherlanguage*}{greek}
Θουκυδίδης Ἀθηναῖος ξυνέγραψε τὸν πόλεμον τῶν Πελοποννησίων καὶ
Ἀθηναίων, ὡς ἐπολέμησαν πρὸς ἀλλήλους, ἀρξάμενος εὐθὺς καθισταμένου 
καὶ ἐλπίσας μέγαν τε ἔσεσθαι καὶ ἀξιολογώτατον τῶν προγεγενημένων, 
τεκμαιρόμενος ὅτι ἀκμάζοντές τε ᾖσαν ἐς αὐτὸν ἀμφότεροι παρασκευῇ 
τῇ πάσῃ καὶ τὸ ἄλλο Ἑλληνικὸν ὁρῶν ξυνιστάμενον πρὸς ἑκατέρους, τὸ 
μὲν εὐθύς, τὸ δὲ καὶ διανοούμενον. [2] κίνησις γὰρ αὕτη μεγίστη δὴ 
τοῖς Ἕλλησιν ἐγένετο καὶ μέρει τινὶ τῶν βαρβάρων, ὡς δὲ εἰπεῖν καὶ 
ἐπὶ πλεῖστον ἀνθρώπων. [3] τὰ γὰρ πρὸ αὐτῶν καὶ τὰ ἔτι παλαίτερα 
σαφῶς μὲν εὑρεῖν διὰ χρόνου πλῆθος ἀδύνατα ἦν, ἐκ δὲ τεκμηρίων ὧν 
ἐπὶ μακρότατον σκοποῦντί μοι πιστεῦσαι ξυμβαίνει οὐ μεγάλα νομίζω 
γενέσθαι οὔτε κατὰ τοὺς πολέμους οὔτε ἐς τὰ ἄλλα.
\end{otherlanguage*}

\end{document}

If you don't have the font installed as a system font, you can set it up by

\setmainfont{Tempora}[
  Extension=.otf,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
  BoldFont=*-Bold,
  BoldItalicFont=*-BoldItalic,
]

enter image description here

If you want to use Tempora just for Greek, do

\setmainfont{Times New Roman}

\newfontfamily{\greekfont}{Tempora}[
  Extension=.otf,
  UprightFont=*-Regular,
  ItalicFont=*-Italic,
  BoldFont=*-Bold,
  BoldItalicFont=*-BoldItalic,
]
6
  • Thanks! It works, although Tempora is slightly different from Times New Roman. Is a good practice to leave out \begin{otherlanguage*}{greek}?
    – Urel
    Commented Apr 4, 2021 at 21:38
  • 1
    @Urel No, it isn't good practice: you get no hyphenation, for instance.
    – egreg
    Commented Apr 4, 2021 at 21:40
  • 2
    @Urel If you want LaTeX to be able to recognize what language you are typing in without explicit tagging, babel in LuaLaTeX supports that feature.
    – Davislor
    Commented Apr 5, 2021 at 0:50
  • @Davislor really? So if I use \usepackage[greek.polutoniko,italian]{babel} with LuaLaTeX, will I get the correct hyphenation without specifying the language?
    – Urel
    Commented Apr 5, 2021 at 11:15
  • 1
    @Urel Not quite that simple, unfortunately. Here is some sample code.
    – Davislor
    Commented Apr 5, 2021 at 13:40

You must log in to answer this question.

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