From ffd652038baef26fb84de26fce9991a02e875485 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 28 Oct 2019 20:58:49 +0000 Subject: polyglossia (28oct19) git-svn-id: svn://tug.org/texlive/trunk@52555 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/polyglossia/gloss-hebrew.ldf | 49 +++++++++++----------- 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf') diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf index cb6ed7ef2b6..1f366a0f551 100644 --- a/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf +++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-hebrew.ldf @@ -8,14 +8,14 @@ and may look very wrong.} \RequireBidi \RequirePackage{hebrewcal} -\providebool{@hebrew@marcheshvan} - \PolyglossiaSetup{hebrew}{ script=Hebrew, direction=RL, scripttag=hebr, + langtag=IWR, hyphennames={nohyphenation}, fontsetup=true, + localnumeral=hebrewnumerals %TODO localalph={hebrewnumeral,Hebrewnumeral} %digits = hebrewnumber } @@ -31,16 +31,10 @@ and may look very wrong.} \@calendar@hebrewfalse% \fi} -\define@boolkey{hebrew}[@xpg@hebrew@]{marcheshvan}[false]{% - \def\@tmpa{#1}% - \def\@tmptrue{true}% - \ifx\@tmpa\@tmptrue - \@xpg@hebrew@marcheshvantrue - \else - \@xpg@hebrew@marcheshvanfalse - \fi} +\newif\if@xpg@hebrew@marcheshvan +\@xpg@hebrew@marcheshvanfalse -\setkeys{hebrew}{marcheshvan} +\define@boolkey{hebrew}[@xpg@hebrew@]{marcheshvan}[true]{} % hebrewcal.sty also defines the boolean key fullyear (default=false) @@ -100,41 +94,48 @@ and may look very wrong.} \input{babel-hebrewalph.def} +\newcommand{\hebrewnumerals}[2]{\hebrewnumber{#2}} + \def\hebrewnumber#1{% \if@hebrew@numerals - \protect\hebrewnumeral{#1}% + \hebrewnumeral{#1}% \else \number#1% \fi } \def\hebrew@numbers{% - \let\@origalph\@alph% - \let\@origAlph\@Alph% \let\@alph\hebrewnumeral% \let\@Alph\Hebrewnumeral% } + \def\nohebrew@numbers{% - \let\@alph\@origalph% - \let\@Alph\@origAlph% + \let\@alph\latin@alph% + \let\@Alph\latin@Alph% } \def\hebrew@globalnumbers{% - \let\orig@arabic\@arabic% \let\@arabic\hebrewnumber% - \renewcommand\thefootnote{\protect\hebrewnumber{\c@footnote}}% + \renewcommand\thefootnote{\localnumeral*{footnote}}% } + +% Store original definition +\let\xpg@save@arabic\@arabic + \def\nohebrew@globalnumbers{% - \let\@arabic\orig@arabic% - \renewcommand\thefootnote{\protect\number{\c@footnote}}% + \let\@arabic\xpg@save@arabic% } +% Save original \MakeUppercase definition +\let\xpg@save@MakeUppercase\MakeUppercase + \def\blockextras@hebrew{% - \let\@@MakeUppercase\MakeUppercase% \def\MakeUppercase##1{##1}% - } +} + \def\noextras@hebrew{% - \let\MakeUppercase\@@MakeUppercase% - } + % restore original \MakeUppercase definition + \let\MakeUppercase\xpg@save@MakeUppercase% +} \endinput -- cgit v1.2.3