The following LaTeX code is saved in the file ~\test.tex:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
%\usepackage{polyglossia}
%\setmainlanguage{hebrew}
\usepackage{cleveref}
\begin{document}
\begin{theorem}\label{mythm}
A house is not a home.
\begin{equation}\label{myeq}
x+y=z
\end{equation}
\end{theorem}
Consider~\cref{mythm}, and compare it with~\cref{myeq}.
\end{document}
When the following commands are executed in the Terminal:
cd ~
xelatex test
a PDF file is generated at the path ~\test.pdf. When opened in a PDF viewer, the file displays as follows:
If now the two commented lines are uncommented, and the xelatex test command is rerun, the execution fails.
Is there a way to get the cleveref package to work with Hebrew, with eitherpolyglossia or babel as the language package? If not, is there another, similar package that works with Hebrew? If not, is there a simple way to emulate the cleveref package?


otherlanguageenvironment or\selectlanguage{english}) don't work anymore. If I don't use this patch, then English works and Hebrew doesn't. Is there a way to apply this patch only when the Hebrew language is selected? – Shai Avr Aug 26 '23 at 21:01babelorpolyglossiamachinery well enough to be able to offer a usable answer. It's not by accident that my answer makes use of thecleverefmachinery, which operates independently of thebabel/polyglossiamachinery. It so happens that I'm very familiar withcleveref. Unfortunately, nobody has so far provide a Hebrew language module forcleveref. – Mico Aug 26 '23 at 21:22cleveref(I am a native Hebrew speaker). However, I have no experience with the procedure. I tried to read the docs, but I have no experience withdtxfiles and I don't understand where to find existing definitions to know what needs to be translated and how. – Shai Avr Aug 27 '23 at 10:01cleverefpacakge, directly. I have to warn you, though, that Toby appears to have moved on from thecleverefpackage to new interests in recent years. The most recent update tocleverefoccurred in early 2018, and he doesn't appear to answer cleveref-related emails anymore. (At least, he hasn't answered my emails in a while...) But if you contact him with an offer to provide Hebrew translations ofequation,theorem,section, etc, he might respond. Keeping my fingers crossed! – Mico Aug 27 '23 at 10:16