6

The difficult bit is that the enumitem package has a closed list of numbering formats, and that \hebrewnumeral is not part of them. I have

\renewcommand{\theenumi}{\hebrewnumeral{\value{enumi}}}
\renewcommand{\labelenumi}{\theenumi}

but this is not so robust, e.g., it applies only to lists at the first level, and then there are issues of references to the list and more.

Any ideas on how the enumitem package can be hacked to do this?

Yossi Gil
  • 15,951
  • Would not something like \makeatletter \def\hebnum#1{\expandafter\hebrewnumeral\csname c@#1\endcsname} \AddEnumerateCounter{\hebnum}{\hebrewnumeral}{XXX} \makeatother work? Lifted from the enumitem docs sec.2.3, I don't know enough about the xetex mechanisms to try with proper hebrew stuff. – Ulrich Schwarz Feb 18 '11 at 15:51
  • In the case that the document's main language is set to Hebrew via babel, a simple solution is given here. – Evan Aad Dec 09 '22 at 05:48

2 Answers2

6

If you set the language with

\setmainlanguage[numerals=hebrew]{hebrew}

all Arabic numerals will be replaced by Hebrew ones.

Caramdir
  • 89,023
  • 26
  • 255
  • 291
  • 2
    Alas, but one does not want all numerals to change. In English for example, it would make sense to change certain enumerations to (a), (b), (c), ..., but you do not usually want to pay the price of numbering your pages, figures, tables, theorems and sections with this scheme. – Yossi Gil Feb 18 '11 at 15:49
4

Here's one way to do it.

\documentclass{article}
\usepackage{enumitem}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{Corsiva Hebrew}
\setenumerate[1]{label=\texthebrew{\protect\hebrewnumeral{\value{enumi}}}}
\setenumerate[2]{label*=.\texthebrew{\protect\hebrewnumeral{\value{enumii}}}}
\setenumerate[3]{label*=.\texthebrew{\protect\hebrewnumeral{\value{enumiii}}}}
\setenumerate[4]{label*=.\texthebrew{\protect\hebrewnumeral{\value{enumiv}}}}
\begin{document}
\begin{enumerate}
        \item A
        \item B
        \item \begin{enumerate}
                \item 1
                \item 2
                \item \begin{enumerate}
                        \item a
                        \item b
                        \item \begin{enumerate}
                                \item I
                                \item II
                                \item III
                        \end{enumerate}
                \end{enumerate}
        \end{enumerate}
\end{enumerate}
\end{document}

enter image description here

TH.
  • 62,639