I'm trying to use perpage footnotes with the manyfoot package. I'd also like to hyphenate polytonic Greek text using the polyglossia package.
But with this code, I'm getting an error:
\documentclass[11pt]{book}
%\usepackage[margin=1cm]{geometry}
\usepackage{titlesec}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainfont{Times New Roman}
\setdefaultlanguage[variant=poly]{greek}
\setmainlanguage[variant=poly]{greek}
\setotherlanguage{english}
\setmainfont{Times New Roman}
\newfontfamily\greekfont{Times New Roman}
\usepackage{alltt}
\usepackage{lineno}
\usepackage[para*,ruled,perpage]{manyfoot}
\DeclareNewFootnote[para]{A}
\newcommand{\mytext}{This is a footnote for my page. It should be long and create lots of problems, if possible.}
\begin{document}
\begin{alltt}\normalfont
ἔνθ᾽ ἄλλοι μὲν πάντες, \footnoteA{\mytext}ὅσοι φύγον αἰπὺν ὄλεθρον,
οἴκοι ἔσαν, πόλεμόν τε \footnoteA{\mytext}πεφευγότες ἠδὲ θάλασσαν:
τὸν δ᾽ οἶον νόστου \footnoteA{\mytext}κεχρημένον ἠδὲ γυναικὸς
νύμφη πότνι᾽ ἔρυκε \footnoteA{\mytext}Καλυψὼ δῖα θεάων
ἐν σπέσσι γλαφυροῖσι, \footnoteA{\mytext}λιλαιομένη πόσιν εἶναι.
ἀλλ᾽ ὅτε δὴ ἔτος ἦλθε \footnoteA{\mytext}περιπλομένων ἐνιαυτῶν,
τῷ οἱ ἐπεκλώσαντο \footnoteA{\mytext}θεοὶ οἶκόνδε νέεσθαι
εἰς Ἰθάκην, οὐδ᾽ \footnoteA{\mytext}ἔνθα πεφυγμένος ἦεν ἀέθλων
καὶ μετὰ οἷσι \footnoteA{\mytext}φίλοισι. θεοὶ δ᾽ ἐλέαιρον ἅπαντες
νόσφι Ποσειδάωνος: \footnoteA{\mytext}ὁ δ᾽ ἀσπερχὲς μενέαινεν
ἀντιθέῳ Ὀδυσῆι πάρος \footnoteA{\mytext}ἣν γαῖαν ἱκέσθαι.
\end{alltt}
\end{document}
The error is here:
! Package polyglossia Error: The current latin font TimesNewRoman(1) does not c ontain the "Greek" script! (polyglossia) Please define \greekfont with \newfontfamily command.
I followed the instructions and added the \greekfont definition. However, the error still occurs. It seems to be a conflict with the \begin{alltt}\normalfont call, because if I comment out the alltt lines, the error goes away, and the code works as intended.
Does anyone know why this error occurs? Does it have to do with the \normalfont call in some way?
alltt
? Its main purpose is for printing computer code in a monospaced font (lmmono10, specifically).\setmonofont{Times New Roman}
; also Arial and Noto Sans Mono. Guess: is polyglossia seeingalltt
's lmmono10 (which has nogrek
) at begin environment?