TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to use minted with Hebrew as the default language with polyglossia:

\setdefaultlanguage[calendar=hebrew, numerals=arabic]{hebrew}
\newfontfamily\hebrewfont{David CLM}


    $ for i in {1..2}; do echo 'Hello World'; done
    Hello World
    Hello World

Results in:

$ xelatex -shell-escape test
! Package polyglossia Error: 
The current roman font does not contain the Hebrew script!
Please define \hebrewfont with \newfontfamily.

See the polyglossia package documentation for explanation.
Type  H <return>  for immediate help.

l.1 \begin{Verbatim}[commandchars=\\\{\}, ]

I think I understand what the error is saying, but not sure why.

I'm in the english environment which should use the default English font... So why am I getting errors about Hebrew stuff?

(I did manage to workaround it by setting the default language to English, but that made other things break unfortunately)

share|improve this question
up vote 8 down vote accepted

It's a clear bug in how Polyglossia manages the situation, as it seems not taking into account the current language. A temporary workaround is to say


just after \newfontfamily\hebrewfont{David CLM} (it suffices to say it in the preamble, anyway). This assuming that you don't need Hebrew in the minted environment.

share|improve this answer
Thanks everybody I had similar problem for arabic font and replaced '\let\hebrewfonttt\ttfamily' by '\let\arabicfonttt\ttfamily' and all works well for verbatim the english characters. but when I write arabic characters between \begin{verbatim} and \end{verbatim}, it doesn't recognize it and compiles nothing or blank line. How can I write arabic characters in verbatim ? – Faouzi Bellalouna Oct 17 '14 at 7:55
@FaouziBellalouna You need a (monospaced) font that supports Arabic. Sorry, but I can't say more without a real example. Will you make it in a new question? – egreg Oct 17 '14 at 8:03
I just saw your comment. I'll make a new question soon. Thanks – Faouzi Bellalouna Oct 17 '14 at 12:11
@ egreg. Here's the question I made. tex.stackexchange.com/questions/207636/verbatim-and-polyglossia – Faouzi Bellalouna Oct 17 '14 at 12:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.