[XeTeX] POLYGLOSSIA with Hebrew

François Charette firmicus at ankabut.net
Fri Apr 24 20:34:12 CEST 2009

Efraim Feinstein a écrit :
> Hi,
> sjo wrote:
>> I have tried doing Hebrew with polyglossia and ran into two problems.
>> 2. The date for today shows up 5769 but the 5 is a ה rather than a ש, etc.
> 0. This looks like oddness in \hebrewnumeral, which is used to generate 
> the numeric date.  It's using a chart similar to 
> http://www.inner.org/gematria/gemchart.php where the final letters 
> represent numbers between 500 and 900.  The heh-geresh represents 5000.  
> The nun sofit represents 700.  It's not the representation of Hebrew 
> numerals that most readers would be familiar with.

Not being really knowledgeable of Hebrew, I had simply adapted the code
from Babel (file hebrew.ldf), expecting user feedback to further improve
it. In 18 months I only had one email with suggestions/fixes for the
Hebrew module (which have been applied). Again, if someone is willing
and able to submit improvements, I'd be very grateful!

FYI, the current code for Hebrew numerals is this

%Hebrew alphabetic numerals (primitive implementation -- the code in
Babel is more complex):
\def\heb at num@i#1{%
  \ifnum#1=\z@\hebnum at zero\fi}
\def\heb at num@ii#1{%
  \ifnum#1=\z@\fi\heb at num@i}
\def\heb at num@iii#1{%
  \ifnum#1=\z@\fi\heb at num@ii}
\def\heb at num@iv#1{%
  \ifnum#1=\z@\fi\heb at num@iii}
%TODO [optionally]
% -insert gereshayim (\char"05F4) before last letter of a sequence of
two letters or more
% -insert geresh (\char"05F3) after letter if it is alone

> The other obvious strange things in the implementation are:
> 1. The Gregorian date as represented in Hebrew has no space between the 
> day number and the month name (it says "כגבאפריל" instead of "כג באפריל")

Obviously a bug. (Strange since the macro clearly has a \space after
\day ...) I'll look into this.

> 2. I would usually expect a gershayim indicating that the value is 
> numeric -- כ״ט = 29, instead of  כט.  In really old documents, all the 
> letters in the number might have upper dots attached.
As you can see above that was marked as "TODO" ;)

> 3. The values used for 15 and 16 (yod-heh and yod-vav) are never used to 
> represent those numbers; it's usually tet-vav and tet-zayin.
OK, thanks.



More information about the XeTeX mailing list