I'm trying to write a document with tufte-book. Most of the document is supposed to be in English but I wish to write some text in Hebrew. I am able successfully compile documents with more common document classes with polyglossia and Tectonic which internally uses XeTeX. But with tufte-book and this MWE:
%! TEX program = xelatex
\documentclass[nols,nobib,bidi]{tufte-book}
% Language
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\begin{document}
Hello World.
\end{document}
I get this weird error:
****************************************************
(biditools.sty) (zref-abspage.sty (zref-base.sty)) (latex-xetex-bidi.def
! LaTeX Error: Command \XeTeX already defined.
Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.138 ...di@reflect@box{E}}\kern-.1667em \TeX}}$}}
I'm using tufte-book from it's Git repository. Is this a polyglossia bug or a tufte bug? I'd also like to know what use can I find for the bidi
option in tufte-book
\documentclass
.
Lastly, this question suggests to use biditufte-book
class provided by the bidi
package but I can't use it since I'd like to use biblatex
and biditufte-book
doesn't support the nobib
option which I need.
tufte
suite should be updated not to loadxltxtra
. This package loadsmetalogo
and this is the problem, becausebidi
doesn't check whether\XeTeX
and\XeLaTeX
are already defined (which is also wrong). Just add\let\XeTeX\relax
and\let\XeLaTeX\relax
before\usepackage{polyglossia}
.