I am trying to compile a document that contains both English and Hebrew. The problem is, that although I have selected Documents | Settings | Use non-tex fonts via XeTeX |LuaTeX, there is no option to export the file to PDF via Xetex (LuaTex always gives me all sorts of errors about not recognizing fonts). I then tried to see if XeTeX is installed, by entering the following into a terminal:

sudo apt-get install texlive-xetex

In case it helps/matters: I'm running Lyx 2.0 on a Linux Mint machine. An extensive search, unfortunately, yielded no answers that worked.

So, my question is: How can I export the document to PDF via XeTeX (I only have the LuaTeX option)?

(P.S. If this question has been previously answered, I'd greatly appreciate a link to the page!)

  • The option File -> Export -> PDF (XeTeX) doesn't appear for you? – juliohm Oct 8 '13 at 21:44
  • Can you post a minimal LyX example? If I open examples/splash.lyx, I am allowed to export using the menu as @juliohm suggested. You might want to try the latest version of LyX (e.g. LyX 2.1 beta 1). I don't know how it works on Mint, but for Ubuntu you can easily install other versions without interfering with your current versions. They can exist peacefully together: wiki.lyx.org/LyX/LyXOnUbuntu#toc3 – scottkosty Oct 9 '13 at 1:24
  • Also note my export of the Hebrew splash.lyx fails. If you find a solution or have suggestions on how I could successfully export splash.lyx with XeTeX on Ubuntu, please let me know so I can add this to LyX's tests. – scottkosty Oct 9 '13 at 1:25
  • @ juliohm: Correct, this option doesn't appear for me. I only get the option to export via LuaTex – Brill Oct 9 '13 at 17:47
  • @scottkosty: I wrote a sample file in Lyx, where the following appears when I click on "View Source"@ % Preview source code for paragraph 0 \documentclass[english,hebrew]{article} \usepackage{fontspec} \usepackage{babel} \begin{document} \selectlanguage{english}% This is a test \R{זה ניסוי}\selectlanguage{hebrew}% \end{document} If I find a way round this issue, I'll post it. – Brill Oct 9 '13 at 17:49

You need to select the font. For an example, do the following. After

sudo apt-get install culmus culmus-fancy

in LyX go to File > Open, click on the examples button, click on he and open splash.lyx. Then go to Document Settings > Fonts, check Use non-TeX fonts and for all of the fonts, choose Frank Ruehl CLM (this was installed by the culmus package, along with several others). Finally, change Article (Hebrew) to article and compile.

The last change is necessary because (although I'm not sure why), XeTeX does not seem to like the following (which is added by Article (Hebrew):


Following the above steps leads to the following pdf

enter image description here

produced by the following code:

%% LyX 2.1.0dev created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\setmainfont[Mapping=tex-text]{Frank Ruehl CLM}
\setsansfont[Mapping=tex-text]{Frank Ruehl CLM}
\setmonofont{Frank Ruehl CLM}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.



\title{ברוכים הבאים ל- \textenglish{\LyX{}}}


\section*{כמה נקודות שחשוב לדעת על שימוש ב- \textenglish{\protect\LyX{}}}
\item \textenglish{\LyX{}} מגיע עם מסמכי תיעוד ועזרה מצויינים \textenglish{—}
מומלץ להשתמש בהם. כדאי להתחיל בקריאת הקובץ \textsf{עזרה$\vartriangleleft$מבוא},
המהווה הקדמה קצרה לתיעוד. לאחר מכן, ניתן להמשיך בקריאת \textsf{עזרה$\vartriangleleft$השיעור~המודרך}
על מנת ללמוד איך להשתמש ב- \textenglish{\LyX{}}.
\item אנחנו מתייחסים אל \textenglish{\LyX{}} כאל \char`\"{}מעבד מסמכים\char`\"{}.
הוא מתוכנן להיות שונה ממעבד תמלילים רגיל כך שמלאכת כתיבת המסמכים תהיה
קלה יותר. מסמכי העזרה והתיעוד יבהירו לך סוגיה זו%
\footnote{האם כבר הזכרנו כמה חשוב לקרוא אותם?%
\item הפלט שיוצא מ- \textenglish{\LyX{}} נראה פשוט נהדר \textenglish{—}
לחץ על \textsf{תצוגה}$\vartriangleleft$\textenglish{\textsf{Dvi}}
וראה בעצמך.
\item \textenglish{\LyX{}} מסוגל לחקות (כמעט) את כל האפשרויות של \textenglish{\LaTeX{}},
והוא מסוגל לייבא קבצי \textenglish{\LaTeX{}}. משתמשי \textenglish{\LaTeX{}}
מנוסים יכולים לפיכך לקרוא את \char`\"{}השיעור המודרך\char`\"{} ברפרוף
ולהעמיק בחלק ''\textenglish{\LyX{}} למשתמשי \textenglish{\LaTeX{}}\char`\"{}
(כל השאר אל תדאגו! לא צריך לדעת \textenglish{\LaTeX{}} בשביל להשתמש
ב- \textenglish{\LyX{}}).
\item \textenglish{\LyX{}} מכיל מגוון של אפשרויות המיועדות עבור משתמשים
הכותבים או קוראים שפות נוספות חוץ מאנגלית. בנוסף לכך, ניתן להתאים
אישית מקשי קיצור, סרגלי כלים ותכונות נוספות רבות. ראה \textsf{עזרה}
\item דף הבית של \textenglish{\LyX{}} הוא: \url{http://www.lyx.org}. באתר
זה תוכלו לקבל מידע נוסף על התוכנה, להרשם לרשימות הדיוור וללמוד מהסיור
המודרך של \textenglish{\LyX{}}.\end{enumerate}

  • After trying, I got: '! Font LHE/cmr/m/n/10=jerus10 at 10.0pt not loadable: Metric (TFM) file or installed font not found. relax l.22 \begin{document} I wasn't able to read the size data for this font, so I will ignore the font specification. [Wizards can fix TFM files using TFtoPL/PLtoTF.] You might try inserting a different font spec; e.g., type `I\font<same font id>=<substitute font name>'. *** you should not be loading the inputenc package *** XeTeX expects the source to be in UTF8 encoding *** some features of other encodings may conflict, resulting in poor output.' – Brill Oct 14 '13 at 19:10
  • Dang, I thought that would work for you. There's a chance that this is due to the LyX version. To check this, try running xelatex on the LaTeX code that I pasted in my answer. If that doesn't work, my next suggestion would be to 1. install Ubuntu in a virtual box, 2. run github.com/scottkosty/install-tl-ubuntu 3. install package lyx2.1 from the directions here: wiki.lyx.org/LyX/LyXOnUbuntu#toc3 That seems like overkill but I don't know what else to suggest. – scottkosty Oct 14 '13 at 23:49
  • Thanks a ton for your help...I'll post once I've tried it – Brill Oct 16 '13 at 18:18

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.