我想要做這使用 crm10 字型。我怎樣才能做到這一點?我嘗試過一些字體,但我不喜歡它們。
\documentclass{scrreprt}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\setsansfont{Arial}
\newfontfamily\greekfont[Script=Greek]{Linux Libertine O}
\newfontfamily\greekfontsf[Script=Greek]{Linux Libertine O}
\usepackage{polyglossia}
\setdefaultlanguage{greek}
\begin{document}
\tableofcontents{}
\section{Αυτό είναι ελληνικά.}
{\bfseries Welcome to Greek:} Αυτό είναι ελληνικά
Or Russian: Привет
Or Hebrew: מה הבעיה?
\end{document}
答案1
CMU 字體是基於 Computer Modern(以及希臘語的 CB 字體):
\documentclass{scrreprt}
\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\newfontfamily{\greekfont}{CMU Serif}
\newfontfamily{\greekfontsf}{CMU Sans Serif}
\usepackage{polyglossia}
\setdefaultlanguage{greek}
\begin{document}
\tableofcontents{}
\section{Αυτό είναι ελληνικά.}
{\bfseries Welcome to Greek:} Αυτό είναι ελληνικά
Or Russian: Привет
%Or Hebrew: מה הבעיה?
\end{document}
不過,不支援希伯來語。
您可以使用不同的字體支援希伯來語並使用ucharclasses
:
\documentclass{scrreprt}
\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\newfontfamily{\greekfont}{CMU Serif}
\newfontfamily{\greekfontsf}{CMU Sans Serif}
\newfontfamily{\hebrewfont}{Linux Libertine O}[Scale=MatchUppercase]
\usepackage{polyglossia}
\setdefaultlanguage{greek}
\usepackage[Latin,Greek,Hebrew,Cyrillic]{ucharclasses}
\setTransitionsFor{Hebrew}{\begingroup\hebrewfont}{\endgroup}
\begin{document}
\tableofcontents{}
\section{Αυτό είναι ελληνικά.}
{\bfseries Welcome to Greek:} Αυτό είναι ελληνικά
Or Russian: Привет
Or Hebrew: מה הבעיה?
\end{document}