hebarticle: fix compilation with XeTeX (bug #10525)

(cherry picked from commit 1f2eb92b33)
This commit is contained in:
Juergen Spitzmueller 2019-08-15 17:42:27 +02:00
parent 1c2700eb11
commit e097bade85
2 changed files with 21 additions and 20 deletions

View File

@ -9,20 +9,19 @@ Format 66
Input article Input article
Preamble Preamble
\usepackage{theorem} \usepackage{theorem}
\theorembodyfont{\upshape} \theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section] % LuaTeX/luabidi does not know \beginR
\AtBeginDocument{\make@lr\thetheorem} % FIXME LuaTeX/luabidi does not get the order right
\AtBeginDocument{
% The following chunk fixes export with XeTeX. \@ifundefined{setRTL}{}{\providecommand\beginR{\setRTL}}
% It is needed because polyglossia is used by default }
% and \make@lr is only defined by babel. \newtheorem{theorem}{{\beginR משפט}}[section]
\@ifundefined{make@lr} % Only needed by babel, not polyglossia (which does
{\def\make@lr#1{\begingroup % not have \make@lr defined)
\toks@=\expandafter{#1}% \@ifundefined{make@lr}{}{%
\edef\x{\endgroup \AtBeginDocument{\make@lr\thetheorem}
\def\noexpand#1{\noexpand\@number{\the\toks@}}}% }
\x}}{\relax}
EndPreamble EndPreamble
@ -59,7 +58,7 @@ Style Lemma
LatexName lemma LatexName lemma
LabelString "Lemma #." LabelString "Lemma #."
Preamble Preamble
\newtheorem{lemma}[theorem]{\R{למה}} \newtheorem{lemma}[theorem]{{\beginR למה}}
EndPreamble EndPreamble
End End
@ -69,7 +68,7 @@ Style Corollary
LatexName corollary LatexName corollary
LabelString "Corollary #." LabelString "Corollary #."
Preamble Preamble
\newtheorem{corollary}[theorem]{\R{מסקנה}} \newtheorem{corollary}[theorem]{{\beginR מסקנה}}
EndPreamble EndPreamble
End End
@ -79,7 +78,7 @@ Style Claim
LatexName claim LatexName claim
LabelString "Claim #." LabelString "Claim #."
Preamble Preamble
\newtheorem{claim}[theorem]{\R{טענה}} \newtheorem{claim}[theorem]{{\beginR טענה}}
EndPreamble EndPreamble
End End
@ -89,7 +88,7 @@ Style Definition
LatexName definition LatexName definition
LabelString "Definition #." LabelString "Definition #."
Preamble Preamble
\newtheorem{definition}[theorem]{\R{הגדרה}} \newtheorem{definition}[theorem]{{\beginR הגדרה}}
EndPreamble EndPreamble
End End
@ -99,7 +98,7 @@ Style Remarks
LatexName remark LatexName remark
LabelString "Remarks #." LabelString "Remarks #."
Preamble Preamble
\newtheorem{remark}[theorem]{\R{הערה}} \newtheorem{remark}[theorem]{{\beginR הערה}}
EndPreamble EndPreamble
End End
@ -132,7 +131,7 @@ Style Proof
EndFont EndFont
Preamble Preamble
\newenvironment{proof}% \newenvironment{proof}%
{\R{\textbf{הוכחה:}}}% {{\beginR \textbf{הוכחה:}}}%
{\hfill\rule{2mm}{2mm}\par\vspace{2mm}} {\hfill\rule{2mm}{2mm}\par\vspace{2mm}}
EndPreamble EndPreamble
End End

View File

@ -92,6 +92,8 @@ What's new
- Fix interplay of the memoir class and custom page size/geometry (bug 10970). - Fix interplay of the memoir class and custom page size/geometry (bug 10970).
- Fix compilation of Hebrew Article with XeTeX and LuaTeX (bug 10525).
* USER INTERFACE * USER INTERFACE