2

I want to use polyglossia to write a Hebrew document with some English. The definition of the english font families only applies to English text included within Hebrew text (the word Corona), but not to standalone English text.

\documentclass[12pt]{article}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}

\newfontfamily\hebrewfont{David}
\newfontfamily\englishfont{Palatino Linotype}
\newfontfamily\englishfontsf{Lucida Sans}
\newfontfamily\englishfonttt{Lucida Sans Typewriter}
\parindent=0pt
\begin{document}
\begin{LTR}
\selectlanguage{english}
\textrm{The quick brown fox jumped over the lazy dog}\\
\textsf{The quick brown fox jumped over the lazy dog}\\
\texttt{The quick brown fox jumped over the lazy dog}\\
\end{LTR}
\begin{RTL}
לצערי ההרצאה בוטלה בגלל ה-
\textenglish{Corona}.
\end{RTL}
\end{document}
1
  • I've taken the liberty of adding the 'fontspec' tag to your posting, as polyglossia automatically loads fontspec.
    – Mico
    Jun 4, 2020 at 11:28

1 Answer 1

2

I think you just need to set it in a different environment. Here are several examples. Note that I changed the English font.

\documentclass[12pt]{article}

\usepackage{polyglossia}
    \setdefaultlanguage{hebrew}
    \setotherlanguage{english}
    \newfontfamily\hebrewfont[Script=Hebrew]{David}
    \newfontfamily{\englishfont}{Linux Libertine O}
    \newfontfamily{\englishfontrm}{Linux Libertine O}
    \newfontfamily{\englishfontsf}{Linux Biolinum O}
    \newfontfamily{\englishfonttt}{Libertinus Mono}
    
\parindent=0pt

\begin{document}

\begin{english}
    \begin{englishfontrm}
The quick brown fox jumped over the lazy dog.
    \end{englishfontrm}

    \begin{englishfontsf}
The quick brown fox jumped over the lazy dog.
    \end{englishfontsf}

    \begin{englishfonttt}
The quick brown fox jumped over the lazy dog.
    \end{englishfonttt} 
\end{english}


\begin{hebrew}
לצערי ההרצאה בוטלה בגלל ה-
\begin{english}\englishfontrm{Corona}\end{english}. 

לצערי ההרצאה בוטלה בגלל ה-
\begin{english}\englishfontsf{Corona}\end{english}.

לצערי ההרצאה בוטלה בגלל ה-
\begin{english}\englishfonttt{Corona}\end{english}.
\end{hebrew}

\end{document}

enter image description here

3
  • Thanks. I'll play around with your example.
    – Moti
    Aug 1, 2020 at 8:33
  • Upvote and accept if it works for you.
    – AML
    Aug 3, 2020 at 1:27
  • @AML Upvote for your answer, but you defined twice the roman font for English: once in \newfontfamily{\englishfont}{...} and then in \newfontfamily{\englishfontrm}{...}. I don't see any reason for defining two different commands, \englishfont and \englishfontrm to insert English text in roman face, altogether when you use the same font face for both.
    – tush
    Jan 10, 2022 at 18:28

You must log in to answer this question.

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