10

I am writing my master’s thesis with the ulthese class, which is now part of MiKTeX and TeX Live. This class is based on memoir and is fairly flexible, but assumes the use of pdfTeX and sets the font encoding to T1. Furthermore, the University requires the use of Computer Modern/Latin Modern or a standard PostScript font (e.g. Times or Palatino).

My thesis is primarily in French, with citations in English and polytonic Greek. With inputenc’s utf8 option, the babel package, and the textalpha package from the lgrx bundle my bases seem to be covered.

I have decided to use Palatino as the main text font (with the mathpazo package) and, because this font family does not cover extended greek, the CB Greek fonts are automatically used instead in babel’s \textgreek commands and {otherlanguage}{polutonikogreek} environments. I have no problem with CB Greek in itself, but it does not blend optimally with Palatino and I would like to use another font’s extended Greek characters. I know that the Type 1 version of Libertine has polytonic Greek (I have checked the .pfb files in FontForge), but I do not know how to use Libertine’s glyphs in the appropriate environments. In fact, I have made a test in which I only used Libertine throughout the document instead of Palatino/Mathpazo, but still Libertine’s Greek was not used and the CB fonts were substituted.

My question is: how can I automatically switch to another font inside babel’s commands and environments on a per-language basis? I am looking for something similar to polyglossia’s \newfontfamily\greekfont[Script=Greek,⟨...⟩]{⟨font⟩}. I know that the lgrx bundle offers a substitutefont package, but I am not sure whether that is what I need, as I do not yet understand what the package does exactly. If there is no “high-level” solution, will I have to use LaTeX’s font-related commands?

If there is no readily available method to use Libertine’s extended Greek, I could be content with Kerkis, which is already set up for automatic use and has many niceties, but I would be very happy if I could use Libertine. What is more, even if I were to use Kerkis for Greek text I would still need to (and want to) use Palatino for the main text, so the switch to Kerkis would have to be confined to Greek environments and commands.

Here follows a minimal working example compiled with a fully updated MacTeX 2012 on OS X 10.8, with pdfTeX. Some commands and options in the preamble are specific to ulthese and I include them to show the complete use case (for example, I use ulthese’s specific hypperef color setup and I use hyperref’s unicode option in order to get polytonic Greek text to display correctly in PDF bookmarks).

\documentclass[12pt,nonatbib,english,polutonikogreek,francais]{ulthese}
  \usepackage[utf8]{inputenc}
  \usepackage{textalpha}
  \usepackage[osf]{mathpazo}
  \usepackage{microtype}
  \chapterstyle{southall}
  \setsecheadstyle{\Large\mdseries}
  \setsubsecheadstyle{\large\mdseries}
  \setsubsubsecheadstyle{\mdseries\scshape}
  \usepackage[unicode]{hyperref}
  \hypersetup{colorlinks,allcolors=ULlinkcolor}
  \frenchbsetup{%
    CompactItemize=false,
    ThinSpaceInFrenchNumbers=true
  }
  \titre{Un mémoire sur la philosophie grecque}
  \auteur{Un étudiant en philosophie}
  \programme{Maîtrise en Philosophie}
  \annee{9999}
  \MA
\begin{document}

\chapter{Introduction à la \textgreek{φύσις} et autres}

Pour les Grecs, la \textgreek{φύσις} a plusieurs sens.
D’ailleurs, c’est le cas de plusieurs mots.

\begin{otherlanguage}{polutonikogreek}
σύμψηφός σοί εἰμι, ἔφη, τούτου τοῦ νόμου, καί μοι ἀρέσκει.
\end{otherlanguage}

\end{document}

2 Answers 2

7

You can try the Artemisia font of the Greek Font Society:

\documentclass[12pt,nonatbib,english,polutonikogreek,francais]{ulthese}

\usepackage[utf8]{inputenc}

\usepackage{textalpha}
\usepackage[osf]{mathpazo}
\usepackage{microtype}
\chapterstyle{southall}
\setsecheadstyle{\Large\mdseries}
\setsubsecheadstyle{\large\mdseries}
\setsubsubsecheadstyle{\mdseries\scshape}

\usepackage[unicode]{hyperref}
\hypersetup{colorlinks,allcolors=ULlinkcolor}
\frenchbsetup{%
  CompactItemize=false,
  ThinSpaceInFrenchNumbers=true
}

%%% Patch \greektext to use Artemisia
\usepackage{xpatch}
\xpatchcmd{\greektext}
  {\selectfont}
  {\fontfamily{artemisia}\selectfont}
  {}{}


\titre{Un mémoire sur la philosophie grecque}
  \auteur{Un étudiant en philosophie}
  \programme{Maîtrise en Philosophie}
  \annee{9999}
  \MA

\begin{document}

\chapter{Introduction à la \textgreek{φύσις} et autres}

Pour les Grecs, la \textgreek{φύσις} a plusieurs sens.
D’ailleurs, c’est le cas de plusieurs mots.

\begin{otherlanguage}{polutonikogreek}
σύμψηφός σοί εἰμι, ἔφη, τούτου τοῦ νόμου, καί μοι ἀρέσκει.
\end{otherlanguage}

\end{document}

enter image description here

3
  • Beautiful! This is even better than Libertine because it has accented greek small caps, and the latin letters look nice too. I have yet to understand how xpatch works, so for now this looks like sorcery to me, but I appreciate the efficiency of this solution. Apr 4, 2013 at 14:39
  • However, I just read in the documentation of xpatch and regexpatch that eventually the latter will replace the former and that this might break existing code: if and when that happens, what should one know in order to repatch correctly? Also, is it possible to renew the \greektext command with \renewcommand instead of patching it with an etoolbox-style command? Apr 4, 2013 at 14:56
  • 1
    @ChristianGagné The latter package is under development; currently, the only common problem might be the need to add \makeatletter and \makeatother around the patching command; I hope to be able to get rid of this before the big change (which is not near in time, by the way).
    – egreg
    Apr 4, 2013 at 16:31
1

Nowadays,a simple \usepackage{libertine} does the trick.

To combine fonts, the NFSS font framework for 8-bit TeX provides \DeclareFontFamilySubstitution (see LaTeX News, Issue 31).

\documentclass{article}
\usepackage[greek,english]{babel}

\usepackage{libertine}
\DeclareFontFamilySubstitution{LGR}{\rmdefault}{artemisia}

\begin{document}
A line of text in English.
    
\foreignlanguage{greek}{Μια γραμμή κειμένου στα Ελληνικά.}
\end{document}

You must log in to answer this question.

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