in All availableThis forumThis topic
 Hebrew in Lyx?
Author Message
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Wed Sep 07, 2011 2:00 am    Post subject: Hebrew in Lyx? So, I'm writing a paper in English that contains quotes from the Hebrew Bible; consequently, I want to have the original Hebrew alongside the English (King James, or similar) version. I've installed the culmus and culmus-latex package, but Lyx is still throwing a bunch of "unknown control sequence" errors at me if I try to render the pages with Hebrew text. The posts I've seen on this here are pretty old; does this still work with the latest Lyx? Am I doing something wrong? Thanks, EE
mark_alec
Bodhisattva

Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

 Posted: Wed Sep 07, 2011 11:50 am    Post subject: Try using XeTeX instead of LaTeX - it should enable you to use any unicode characters without trouble. The LyX website has information on it. On Gentoo, USE=xetex for texlive will install xetex. Setting LINGUAS=he will probably also be a good idea (not sure what the texlive-hebrew packages do)._________________www.gentoo.org.au || #gentoo-au
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Wed Sep 07, 2011 12:33 pm    Post subject: Hey, thanks for the advice. I don't seem to have had texlive installed at all (??), so now I'm doing that with the xetex flag. However, following that guide, I'm now told that "bidi.sty" cannot be found. I can't seem to find the gentoo package that provides it. Do you happen to know? Thanks, EE
mark_alec
Bodhisattva

Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

 Posted: Wed Sep 07, 2011 1:20 pm    Post subject: It seems that texlive-langarabic provides it, so set LINGUAS="ar" for texlive and it should pull it in._________________www.gentoo.org.au || #gentoo-au
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

Posted: Wed Sep 07, 2011 1:37 pm    Post subject:

hrm. Strange that 'texlive-hebrew' did not, but oh well.

Now I get errors:
 Code: ! Package bidi Error: Oops! you have loaded package xltxtra after bidi package. ! Package bidi Error: Oops! you have loaded package polyglossia after bidi pack ! Package polyglossia Error: The current roman font does not contain the Hebrew script! Please define \hebrewfont with \newfontfamily.

The latter ones about the font don't seem critical (since it says the same thing about the Greek, and that renders just fine), but I'm confused about the bidi loading. '\loadpackage{bidi}' is the last line of the preamble, and 'polyglossia' isn't in the preamble at all. So where is it loading those?

If you like, I've dumped the whole error log to pastebin: http://paste2.org/p/1635963

thanks again,

EE
mark_alec
Bodhisattva

Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

 Posted: Wed Sep 07, 2011 1:44 pm    Post subject: Take a look at http://en.foursenses.net/hebrewinxetex - it seems you need some specific things in your preamble to get it working correctly._________________www.gentoo.org.au || #gentoo-au
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

Posted: Wed Sep 07, 2011 2:30 pm    Post subject:

So, I followed that guide, and still get the error about bidi coming before other packages in the load order. If I remove bidi from the preamble, it still won't load. The errors I get are like this:

 Code: ! Package polyglossia Error: The current roman font does not contain the Hebrew script! Please define \hebrewfont with \newfontfamily. ! Extra \endgroup. \endgroup l.2051 \end{hebrew}                    % Things are pretty mixed up, but I think the worst is over. ! Package polyglossia Error: The current roman font does not contain the Greek script! Please define \greekfont with \newfontfamily.

So, it's nice that Xetex has a sense of humor about this, but I'm still not really sure what the problem is. I'm trying to set up an interlinear section of Hebrew alongside English verses (ie, alternating), so xetex has to be able to handle switching text direction from line to line. It doesn't seem to be doing that. Any other suggestions?[/code]

EE
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Wed Sep 07, 2011 3:04 pm    Post subject: okay, I've made some progress: I followed the instructions here, and at least xetex is rendering the document. However, the hebrew characters are blank, and I no longer have the option to specify the character encoding (Document→Settings→Language→Encoding is greyed out). Also, it seems my Greek font has disappeared (it used to render correctly). So, we're getting there, I guess? Any ideas how to get the fonts back? Thanks, EE
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Wed Sep 07, 2011 3:37 pm    Post subject: huh. Well, I discovered the \fontspec TeX operator, and now I have biblical Hebrew. Awesome. Greek, however, is still missing, as is the option to set encoding as per the previous message. Can you tell me how to fix those? Thanks, EE
mark_alec
Bodhisattva

Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

 Posted: Wed Sep 07, 2011 3:47 pm    Post subject: http://en.foursenses.net/greekinxetex ? It seems you'll need to select a font that support Greek characters._________________www.gentoo.org.au || #gentoo-au
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Wed Sep 07, 2011 7:11 pm    Post subject: okay, I did a lot of digging around, and got both Greek and Hebrew working, with one exception: I can't set the style for the Hebrew section to "Quotation," or it throws off all the numbering for cross-references and citations. It has something to do with where Lyx is putting the flags to start and end sections of different languages vs. styles. I'm not sure why that would børk the citation numbering, but I'll leave it alone for now. In short: I have to set a bunch of fonts in the preamble, and then use fontspec to set Hebrew specifically to get RTL text. For whatever reason, that doesn't play nice with how Xetex/Lyx processes numbering. Oh well. I can live with it. Thanks a ton for the sources you posted. I've been banging my head against this all day, and really wasn't getting anywhere. Cheers, EE
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Wed Sep 07, 2011 11:25 pm    Post subject: Okay, so here's a strange behavior that I have more trouble dealing with: for whatever reason, my available-citation list is now only 20 entries long. When I render the document with xetex, all 100+ cited works are listed in the bibilography, and numbered properly in the text. However, I can't add the actual citation when editing past the first 20. Is there some setting I accidentally hit to cause this? Thanks, EE EDIT: ... and, as I suspected, it has to do with font encoding: the 20th entry is the first to use a Lati1-extended character (specifically, an "à"). While pybliographer can handle this just fine, Lyx - and Xetex - cannot. The characters just show up as blank in the printed document, and Lyx stops parsing the bibtex database right after that character. So, we're back to stupid font encoding issues. Is there some package I need to set in my preamble so these characters render properly?
ExecutorElassus
Veteran

Joined: 11 Mar 2004
Posts: 1225
Location: Stuttgart, Germany

 Posted: Sat Oct 08, 2011 12:29 am    Post subject: fixed the previous post: changing the document encoding meant I had to delete and re-enter manually all the extended characters. Now I have a (slightly different) problem from previous posts: I can't use Arabic or Hebrew words (that is, RTL languages) within a main body of text in English. Hebrew displays fine if it has its own paragraph, and manually-specified font, put just shows blank if it's part of some other language text block. Is there something I'm missing here? Surely there are people who typeset biblical passages out there, who consequently would deal with text-direction changes mid-line, and similar issues. Thanks, EE
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum Assistance----------------News & AnnouncementsFrequently Asked QuestionsInstalling GentooMultimediaDesktop EnvironmentsNetworking & SecurityKernel & HardwarePortage & ProgrammingGamers & PlayersOther Things GentooUnsupported Software Discussion & Documentation----------------Documentation, Tips & TricksGentoo ChatGentoo Forums FeedbackOff the WallDuplicate Threads International Gentoo Users----------------中文 (Chinese)DutchFinnishFrenchDeutsches Forum (German)  Diskussionsforum  Deutsche DokumentationGreekForum italiano (Italian)  Forum di discussione italiano  Risorse italiane (documentazione e tools)Polskie forum (Polish)  Instalacja i sprzęt  Polish OTWPortuguese  Documentação, Ferramentas e DicasRussianScandinavianSpanishOther Languages Architectures & Platforms----------------Gentoo on AMD64Gentoo on ARMGentoo on PPCGentoo on SparcGentoo on Alternative ArchitecturesGentoo for Mac OS X (Portage for Mac OS X)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum