Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hebrew in Lyx?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 2:00 am    Post subject: Hebrew in Lyx? Reply with quote

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
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


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

PostPosted: Wed Sep 07, 2011 11:50 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 12:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


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

PostPosted: Wed Sep 07, 2011 1:20 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 1:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


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

PostPosted: Wed Sep 07, 2011 1:44 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 2:30 pm    Post subject: Reply with quote

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.
<recently read> \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]

Thanks again for your help.

EE
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 3:04 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 3:37 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


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

PostPosted: Wed Sep 07, 2011 3:47 pm    Post subject: Reply with quote

http://en.foursenses.net/greekinxetex ?

It seems you'll need to select a font that support Greek characters.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 7:11 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Wed Sep 07, 2011 11:25 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


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

PostPosted: Sat Oct 08, 2011 12:29 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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