使用文件類別時,以下文件正常運作article
:
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{hebrew}
\setotherlanguage{greek}
\newfontfamily\hebrewfont{SBL Hebrew}
\newfontfamily\greekfont{SBL Greek}
\begin{document}
\section{First}
A greek word \textgreek{αταραξία} and a hebrew word \texthebrew{קֹהֶלֶת}
\end{document}
但當我切換到 Beamer 時。它似乎開始忽略字體(我們最終得到空白字元而不是希臘語或希伯來語:
\documentclass{beamer}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{hebrew}
\setotherlanguage{greek}
\newfontfamily\hebrewfont{SBL Hebrew}
\newfontfamily\greekfont{SBL Greek}
\begin{document}
\begin{frame}{First}
A greek word \textgreek{αταραξία} and a hebrew word \texthebrew{קֹהֶלֶת}
\end{frame}
\end{document}
請注意,我們可以添加\setsansfont{Arial}
到投影機範例,它似乎全域告訴投影機使用該Arial
字體,而不是已指定的希伯來語/希臘語字體:
答案1
\documentclass{beamer}
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\setotherlanguage{hebrew}
\setotherlanguage{greek}
\newfontfamily{\hebrewfontsf}{SBL Hebrew}
\newfontfamily{\greekfontsf}{SBL Greek}
\begin{document}
\begin{frame}{First}
A greek word \textgreek{αταραξία} and a hebrew word \texthebrew{קֹהֶלֶת}
\end{frame}
\end{document}