
我正在寫我的碩士論文ulthese
類,現在是 MiKTeX 和 TeX Live 的一部分。該類別基於回憶錄並且相當靈活,但假設使用 pdfTeX 並將字體編碼設為T1
.此外,大學要求使用電腦現代/拉丁現代或標準 PostScript 字體(例如 Times 或 Palatino)。
我的論文主要是法語,引用了英語和多語希臘語。有了inputenc
'sutf8
選項,babel
包,以及捆綁包textalpha
中的包,lgrx
我的基礎似乎已經被覆蓋了。
我決定使用 Palatino 作為主要文字字體(帶有套件mathpazo
),並且由於該字體系列不涵蓋擴展希臘語,因此在babel
的\textgreek
命令和{otherlanguage}{polutonikogreek}
環境中自動使用 CB Greek 字體。我對 CB Greek 本身沒有問題,但它與 Palatino 的融合效果不佳,我想使用另一種字體的擴展希臘字符。我知道 Libertine 的 Type 1 版本具有多調希臘語(我已經檢查了.pfb
FontForge 中的文件),但我不知道如何在適當的環境中使用 Libertine 的字形。事實上,我做了一個測試,在整個文件中我只使用了 Libertine,而不是 Palatino/Mathpazo,但仍然沒有使用 Libertine 的希臘語,而是替換了 CB 字體。
我的問題是:如何babel
在每種語言的基礎上自動切換到命令和環境中的另一種字體?我正在尋找類似的polyglossia
東西\newfontfamily\greekfont[Script=Greek,⟨...⟩]{⟨font⟩}
。我知道該lgrx
捆綁包提供了一個substitutefont
軟體包,但我不確定這是否是我所需要的,因為我還不了解該軟體包的確切用途。如果沒有「進階」解決方案,我是否必須使用 LaTeX 的字體相關命令?
如果沒有現成的方法來使用 Libertine 的擴展希臘語,我可能會對 Kerkis 感到滿意,它已經設定為自動使用並且有很多優點,但如果我可以使用 Libertine,我會非常高興。更重要的是,即使我使用 Kerkis 來表示希臘文本,我仍然需要(並且想使用 Palatino 作為主要文本,因此切換到 Kerkis 必須僅限於希臘語環境和命令。
下面是一個在 OS X 10.8 上使用完全更新的 MacTeX 2012 和 pdfTeX 編譯的最小工作範例。序言中的一些命令和選項是特定的ulthese
,我將它們包含在內以顯示完整的用例(例如,我使用 的ulthese
特定hypperef
顏色設置,並使用hyperref
的unicode
選項以使多調希臘語文本在 PDF 書籤中正確顯示) )。
\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}
答案1
您可以嘗試希臘字體協會的 Artemisia 字體:
\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}
答案2
如今,一個簡單的方法\usepackage{libertine}
就能解決問題。
為了組合字體,8 位元 TeX 的 NFSS 字體框架提供了\DeclareFontFamilySubstitution
(請參閱LaTeX 新聞,第 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}