This fixes XeTeX export of the Hebrew documents.
% set fonts for nicer pdf view
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
% set fonts for nicer pdf view
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
-\fi % end if pdflatex is used
-
-% the pages of the TOC is numbered roman
+% XeTeX with Hebrew does not like this bookmark code
+% so it is in the conditional.
+% The pages of the TOC is numbered roman
% and a pdf-bookmark for the TOC is added
\pagenumbering{roman}
\let\myTOC\tableofcontents
% and a pdf-bookmark for the TOC is added
\pagenumbering{roman}
\let\myTOC\tableofcontents
\cleardoublepage
\pagenumbering{arabic} }
\cleardoublepage
\pagenumbering{arabic} }
+\fi % end if pdflatex is used
+
%disable hyphenation (breaking words at end of line)
\usepackage[none]{hyphenat}
%disable hyphenation (breaking words at end of line)
\usepackage[none]{hyphenat}
% set fonts for nicer pdf view
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
% set fonts for nicer pdf view
\IfFileExists{lmodern.sty}{\usepackage{lmodern}}{}
-\fi % end if pdflatex is used
-
-% the pages of the TOC is numbered roman
+% XeTeX with Hebrew does not like this bookmark code
+% so it is in the conditional.
+% The pages of the TOC is numbered roman
% and a pdf-bookmark for the TOC is added
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
% and a pdf-bookmark for the TOC is added
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
+\fi % end if pdflatex is used
+
%disable hyphenation (breaking words at end of line)
\usepackage[none]{hyphenat}
%disable hyphenation (breaking words at end of line)
\usepackage[none]{hyphenat}