Fix XeTeX export when using heb-article.layout

polyglossia is used by default and \make@lr is only defined
by babel. Modifying the preamble fixes XeTeX export and pdfTeX
continues to work.

See the following thread for more information:
  http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181220.html

Thanks to Enrico for the patch.
This commit is contained in:
Scott Kostyshak 2013-10-19 13:35:49 -04:00
parent 14a5d07df6
commit 2756b43f1c

View File

@ -13,6 +13,16 @@ Preamble
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}
% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
\toks@=\expandafter{#1}%
\edef\x{\endgroup
\def\noexpand#1{\noexpand\@number{\the\toks@}}}%
\x}}{\relax}
EndPreamble