You are not logged in.

#1 2008-01-31 19:03:31

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

[SOLVED] Hebrew in LaTeX?

Hi all,
I recently switched to LaTeX, so I'm still learning it. I'm currently using TeXLive.
For my course at uni I need to use some Hebrew texts, so it is fundamental for me that I get it working.

I tried and tried and tried again, but I keep failing. I know it's because I'm utterly ignorant for now tongue

So, I have tried to use the babel package with Hebrew, and I have also installed ivritex, but there's no way to get this working.

While creating the dvi file, I get errors like:

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `cp1255'.

And if the dvi gets created, I get those errors while opening the file:

Warning: requested character 238 does not exist in `david'

For every single character.

I insert hebrew text by merely copy-pasting.

Is there anyone who can give me some help? I'm still very confused on how this whole latex packaging works, and even more confused by things not working.
I really need to get this done, since this is my last year and I have to write my dissertation, so LaTeX would surely be the best option for such a job.


Thanks for your time.

Last edited by finferflu (2008-02-01 10:25:21)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#2 2008-01-31 19:23:29

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Hebrew in LaTeX?

Ok, I got rid of the first error, by adding:

\usepackage[utf8x]{inputenc}

But the fonts are not turning up in the dvi file, and I keep getting the second error in the terminal when I open it.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#3 2008-01-31 21:35:33

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Hebrew in LaTeX?

I have been able to run latex without any error:

This is pdfTeX, Version 3.141592-1.40.3 (Web2C 7.5.6)
entering extended mode
(./he_sample.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
 french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, 
turkish, ukenglish, ukrainian, loaded.
(/opt/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(/opt/texlive/texmf-dist/tex/latex/base/size10.clo))
(/opt/texlive/texmf-dist/tex/latex/base/inputenc.sty
(/opt/texlive/texmf-dist/tex/latex/ucs/utf8x.def))
(/opt/texlive/texmf-dist/tex/latex/ucs/ucs.sty
(/opt/texlive/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/opt/texlive/texmf-dist/tex/generic/babel/babel.sty
(/opt/texlive/texmf/tex/generic/0ivritex/rlbabel.def)
(/opt/texlive/texmf/tex/generic/0ivritex/hebrew.ldf
(/opt/texlive/texmf-dist/tex/generic/babel/babel.def)

Package babel Warning: No hyphenation patterns were loaded for
(babel)                the language `Hebrew'
(babel)                I will use the patterns loaded for \language=0 instead.

) (/opt/texlive/texmf-dist/tex/generic/babel/english.ldf))
(/opt/texlive/texmf/tex/generic/0ivritex/he8enc.def) (./he_sample.aux
(/opt/texlive/texmf/tex/generic/0ivritex/he8cmr.fd))
(/opt/texlive/texmf-dist/tex/latex/ucs/ucsencs.def)
(/opt/texlive/texmf-dist/tex/latex/ucs/data/uni-5.def) [1] (./he_sample.aux) )
Output written on he_sample.dvi (1 page, 536 bytes).
Transcript written on he_sample.log.

But then when I open the dvi file I still can't see any Hebrew font, and get that error saying that the requested characters do not exist in 'david'. I guess I'll have to change font, but for the love of me I can't find out how.


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#4 2008-01-31 22:20:58

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: [SOLVED] Hebrew in LaTeX?

First few hits in Google look very promising:

http://ivritex.sourceforge.net/
http://www.ctan.org/tex-archive/languag … /cjhebrew/
http://sites.huji.ac.il/tex/newlatex_usage.txt

Never tried it myself though.

Here's a suggestion with xetex (a latex port to use opentype fonts):
http://newsgroups.derkeiler.com/Archive … 01363.html

Last edited by arooaroo (2008-01-31 22:22:23)

Offline

#5 2008-01-31 22:41:26

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Hebrew in LaTeX?

Thanks arooaroo,
I have already tried with ivritex, but I'm not having results. As I said, everything compiles fine, but then the dvi file complains it can't find the fonts.
I'll have to see if cjhebrew works, or this xetex, which unfortunately isn't in the repos (a good reason for me to provide a PKGBUILD? tongue). I hope something will work, I don't ask for extensive support, as I will only have to quote brief passages.

Thanks smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#6 2008-01-31 23:08:40

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: [SOLVED] Hebrew in LaTeX?

Send me your source tex file and I'll have a play with it.

Offline

#7 2008-01-31 23:15:38

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Hebrew in LaTeX?

Thanks.

For now I haven't started writing yet. I was in fact testing the compatibility before starting. So I can give you my test file:

\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,english]{babel}

\begin{document}
\selectlanguage{hebrew}
 כדי לכתוב משהו באנגלית חייבים להשתמש במקרו הבא: \L{Hello, world}. וכאן
 ממשיכים לכתוב בעברית. טקסט נוסחאות תמיד יהיה בכיוון שמאל-לימין

\selectlanguage{english}
This is a test.

\end{document}

Thanks for your help smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#8 2008-02-01 10:22:10

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Hebrew in LaTeX?

Ok, finally I have managed big_smile

The cjhebew package seems to do it for me. It's designed exactly for my kind of work. I have installed it via the texlive-langhebrew package in [community].

So here is a working sample:

\documentclass{article}
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage[hebrew,english]{babel}

\usepackage{cjhebrew}
\begin{document}
\begin{cjhebrew}
br+syt br' 'lhym 't h+smym w't h'r.s;
\end{cjhebrew}


\begin{flushright}
When God began to create heaven and earth, 
\end{flushright}
\end{document}

It was not difficult at all, all I needed was some documentation, which seems to be a bit sparse... I guess it's because of the size of the project.

edit
By the way, I have found a package called texlive-langhebrew-doc. I have to find out how to access LaTeX's documentation...

Thanks for helping anyway smile

Last edited by finferflu (2008-02-01 10:24:42)


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#9 2013-01-13 07:24:36

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [SOLVED] Hebrew in LaTeX?

I was googling this looking for help, and I found my own thread, with my own solution. Sometimes I just love myself big_smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#10 2013-01-13 12:07:06

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] Hebrew in LaTeX?

Nice discovery, finferflu. wink
But it is about time to put this thread in a read only state.
Closing.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB