2

I'm attempting to test out the use of Hebrew text using XeLaTeX in TeXstudio, with Guy Rutenberg's example code:

\documentclass{minimal}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\usepackage{fontspec}
\setmainfont{Frank Ruehl CLM}
\setmonofont{Miriam Mono CLM}
\setsansfont{Simple CLM}
% Use the following if you only want to change the font for Hebrew
%\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
%\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
%\newfontfamily\hebrewfontsf[Script=Hebrew]{Simple CLM}

\makeatletter
\makeatother
\usepackage{bidi}
\begin{document}
טקסט רגיל
\textbf{טקסט מודגש}
\textit{טקסט נטוי}
\textit{\textbf{טקסט מודגש ונטוי}}
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}

\sffamily
טקסט רגיל
\textbf{טקסט מודגש}
\textit{טקסט נטוי}
\textit{\textbf{טקסט מודגש ונטוי}}
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}

\ttfamily
טקסט רגיל
\textbf{טקסט מודגש}
\textit{טקסט נטוי}
\textit{\textbf{טקסט מודגש ונטוי}}
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}
\end{document}

However, when I compile, I'm prompted for a package installation:

enter image description here

And, when proceeding with this installation, I receive the following error during compilation:

! LaTeX Error: File `xetex.def' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: def)Enter file name:! Emergency stop.<read > ...d{ver@\Gin@driver}{\input{\Gin@driver}}{}

I've synchronized the MiKTeX Package Manager in both admin and user modes, but this error still persists. Any ideas how to resolve the issue?

EDIT 1 (8/7/2016 10:24PM)

Here's a screencap of the xetex.def installation from MiKTeX Package Manager:

enter image description here

  • 1
    Welcome! Did you get any errors when you installed? Does it show as installed? What does kpsewhich xetex.def give? Don't use the minimal class - it is not suitable, even for minimal examples, as it is not designed for this. You don't need to load fontspec or bidi as polyglossia will do it. – cfr Aug 8 '16 at 1:46
  • Thanks! I didn't get any errors when installing the graphics-def package containing xetex.def, and I've included a screencap of the installation status in an edit above (in case I'm missing something there). I also changed the minimal class to book and commended out the fontspec and bidi packages, but I'm still getting the same prompt to install xetex.def, and then the same message showing the installation failure. – nxl4 Aug 8 '16 at 2:29
  • But does kpsewhich find it? And did you install for user also? Because when you compile, it can't be found. So something is screwy somewhere. – cfr Aug 8 '16 at 3:22
  • Sorry, I misunderstood you. Running kpsewhich xetex.def produces the same prompt I screencapped above from when I try to compile. And, yes, I did install for all users. – nxl4 Aug 8 '16 at 8:58
  • That's odd. It shouldn't give an error or a prompt. It should just return nothing, I think. Unless it is different on MikTeX, which I've never used. – cfr Aug 8 '16 at 15:04
1

About xetex.def, see previews answer here: Miktex xetex-def package installation.

The following MWE works for me with MacTeX:

\documentclass{article}

\usepackage{polyglossia}
\usepackage{ucharclasses}

\setdefaultlanguage{hebrew}
\setotherlanguage{english}

\setmainfont{Frank Ruehl CLM}

\makeatletter
\makeatother
\usepackage{bidi}
\begin{document}
\noindent
טקסט רגיל
\textit{טקסט נטוי}
\textbf{טקסט מודגש}
\textit{\textbf{טקסט מודגש ונטוי}} % Keep on empty line below

\begin{english}
In the beginning God created the heaven and the earth.
\end{english} % Keep on empty line below

\noindent
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ: \\
\textit{בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:} \\
\textbf{בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:} \\
\textit{\textbf{בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ:}} % Keep on empty line below

\begin{english}
In the beginning God created the heaven and the earth.
\end{english}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.