
在我的文字中從 babel 切換到 plyglossia 似乎與破折號(連續輸入三個破折號)現在印為三個破折號相關。
我認為多語言的改變是偶然的──是什麼原因導致的呢?
\documentclass[12pt]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily{\englishfont}{EB Garamond}
\newfontfamily{\hebrewfont}[Script=Hebrew]{Hadasim CLM}
\newfontfamily{\hebrewfontsf}[Script=Hebrew]{Miriam CLM}
\newfontfamily{\hebrewfonttt}[Script=Hebrew]{Miriam Mono CLM}
\title{Using Hebrew Fonts on Overleaf with polyglossia \\\texthebrew{דוגמא לגופני ברירת מחדל}}
\author{Foo}
\begin{document}
\maketitle
I don't know why it is doing this --- but I don't like it.
\end{document}
答案1
\newfontfamily
不加載\defaultfontfeatures
.
注意:我將希伯來語字體更改為我擁有的字體。
\documentclass[12pt]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily{\englishfont}{EB Garamond}[Ligatures=TeX]
\newfontfamily{\hebrewfont}{Raanana}[Script=Hebrew]
\newfontfamily{\hebrewfontsf}{Raanana}[Script=Hebrew]
\newfontfamily{\hebrewfonttt}{Raanana}[Script=Hebrew]
\title{Using Hebrew Fonts on Overleaf with polyglossia \\\texthebrew{דוגמא לגופני ברירת מחדל}}
\author{Foo}
\begin{document}
\maketitle
I don't know why it is doing this --- but I don't like it.
\end{document}
但使用起來好得多\setmainfont
。
\documentclass[12pt]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\setmainfont{EB Garamond}
\newfontfamily{\hebrewfont}{Raanana}[Script=Hebrew]
\newfontfamily{\hebrewfontsf}{Raanana}[Script=Hebrew]
\newfontfamily{\hebrewfonttt}{Raanana}[Script=Hebrew]
\title{Using Hebrew Fonts on Overleaf with polyglossia \\\texthebrew{דוגמא לגופני ברירת מחדל}}
\author{Foo}
\begin{document}
\maketitle
I don't know why it is doing this --- but I don't like it.
\end{document}
答案2
既然您提到了babel
,如果您決定堅持下去,請執行以下操作:
\documentclass[12pt]{article}
\usepackage[english, bidi=default]{babel}
\babelfont{rm}{EB Garamond}
\babelfont[hebrew]{rm}{Hadasim CLM}
\babelfont[hebrew]{sf}{Miriam CLM}
\babelfont[hebrew]{tt}{Miriam Mono CLM}
\title{Using Hebrew Fonts on Overleaf with Babel\\%
\foreignlanguage{hebrew}{דוגמא לגופני ברירת מחדל}}
\author{Foo}
\begin{document}
\maketitle
I don't know why it is doing this --- but I don't like it.
\end{document}