On Sat, Oct 19, 2013 at 04:56:21AM -0400, Scott Kostyshak wrote:

> To reproduce,
> 
> 1. Open examples/he/splash.lyx
> 2. In Document > Settings > Fonts, check the box "Use non-TeX fonts"
> and change the three fonts to FreeSans (or any other font that
> supports Hebrew).
> 3. Click OK.
> 4. Try to export with XeTeX. It fails.
> 5. Now go to Document > Settings > Document Class and change "Hebrew
> Article" to "Article (Standard Class)".
> 6. XeTeX export compiles fine for me.
> 
> The heb-article layout adds the following to the preamble:
> 
>         \usepackage{theorem}
>         \theorembodyfont{\upshape}
>         \newtheorem{theorem}{\R{משפט}}[section]
>         \AtBeginDocument{\make@lr\thetheorem}
> 
> XeTeX gives the following error:
> ! Undefined control sequence.
> 
> \@begindocumenthook ...aybe_setup_maths: \make@lr
> 
> Are the \newtheorem command (this is the only place in layout files I
> see the \R command) and the \AtBeginDocument command correctly
> written? Is a protect missing?

I think that polyglossia is used by default and \make@lr is only defined
by babel, maybe. Try adding the following snippet to the preamble:

\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
    \toks@=\expandafter{#1}%
    \edef\x{\endgroup
  \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
  \x}}{\relax}

-- 
Enrico

Reply via email to