Go to page:

Search:   Help

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

LyX /

HebrewOnLinux

Categories: Linux, Hebrew
<< | Page list | >>

Hebrew, LyX and Linux can work together.

Method 1 - 'Ubuntu 12.04+ : Use IvriTeX'

If you would like a TeX Live installation with Hebrew support, consider install-tl-ubuntu. It can be run as

  sudo ./install-tl-ubuntu --hebrew

Method 2 - Ubuntu 10.04 (Lucid)

A) Install LyX using the synaptic package manager.
B) Download latest culmus release.(Recommended: not the source-release)
note: Synaptic installation of culmus is general-usage fonts, and not LaTeX fonts. Synaptic's ivritex and texlive-lang-hebrew are not up to date
C) Install culmus:

 a. Extract the downloaded file to a folder
 b. apply "sudo make" via the terminal
 c. apply "sudo make install" via the terminal

D) Launch LyX
E) Go to (Top side menu) Document -> Settings... :

 a. in the Document Class tab (menu on the left side of the window), Set Document Class to "article (Hebrew)".
 b. in the Language tab (menu on the left side of the window), Set Language to "Hebrew", Set encoding to "other: Hebrew (CP 1255)".

F) Go to (Top side menu) Tools -> Preferences ->
a. (in the left side menu) Language Settings and make sure Right-To-Left (RTL) support is enabled. You might want to toggle the "Cursor movement" from Logical to Visual. That will change the behavior of the cursor in math-mode
(The next steps are optional)

 You can use LyX-keyboard mapping instead of Linux-keyboard mapping for Hebrew.For some people, that is more continent, as you do not have to change keyboard-layout when you switch into math-mode. 
 b. Editing->Keyboard/Mouse -- mark "Use keyboard map" and set the "First" to 'null' and the "Second" to 'hebrew'. 
 c. Editing->Shortcut -- Press on "New" button and in the "Function" field write 'language hebrew", and then set shortcut key as you desire. This key will toggle Hebrew\English. Note: for me, 'language english' worked and 'language hebrew' didn't. See Amir Rachum's Article(approve sites)

G) Write some text, Press Ctrl+D, an output file should be generated (if not, some errors will pop up).
H) If all went well, that's it, you're done.

Note: You do not need to change the system keyboard layout when typing hebrew in LyX, you can leave it on "USA".
Another note: if the output is pixelated in close-up, see "Problem - Bitmap output" below.


Method 3 - General

NOTE: The last 2 commands are ubuntu 7.04/7.10-specific, but might work on other distros.

There are many tutorials, most of them are too old, about how to do that. Some of them cause Hebrew to work, but the generated documents are fuzzy, or just not pretty enough.

We recommend this way: (these are Ubuntu oriented instructions, but will probably work on Debian as well)

  • First of all, do not install tetex, it is not maintained any more; install texlive instead.
  • Trying to install ivritex package (as most tutorials suggest) will fail, because ivritex depends on tetex.
  • Instead, install texlive-font-utils.
  • Then, install culmus fonts (and other Hebrew fonts):
 $ sudo aptitude install culmus culmus-fancy xfonts-efont-unicode xfonts-efont-unicode-ib xfonts-intl-european msttcorefonts
 $ sudo make CULMUSDIR=/usr/share/fonts/X11/Type1/ TEXMFDIR=/usr/share/texmf-texlive/
 $ sudo make install CULMUSDIR=/usr/share/fonts/X11/Type1/ TEXMFDIR=/usr/share/texmf-texlive/

The last 2 commands are ubuntu 7.04/7.10-specific, but might work on other distros; if not, try to remove the CULMUSDIR=... (until the end of the line) and see if the make recognizes the right directories instead.

Now your Hebrew documents should look much better!

Problem - Bitmap output

Following the instruction in this page I managed to produce hebrew pdf, but with bitmap font (not vector one). After looking at other sites, I found out I had to add "\usepackage{culmus}" (or "\usepackage[use-david]{culmus}" - matter of taste) to the preamble. Perhaps this will help others as well.

Nikud/Vowels

Going beyond the use of consonants to add Nikud, or vowel points, to Hebrew seems to cause a fair amount of difficulty.

  • set your document encoding to utf8x (in the language tab of the document's preferences)
  • add \errorcontextlines=10 to your document's preamble

This should remove the errors requesting you activate the combine option.

LyX 2.1+ with unicode

It is fairly simple to get LyX to display and print fully pointed Hebrew with recent versions. (The set up below also allows the use of fully accented polytonic Greek.)

This set up requires the use of XeTeX, so ensure that your LyX installation supports this output method first.

The use of the Cardo font for the display of Hebrew and Greek is strongly recommended, as it has an extensive character set. See http://scholarsfonts.net/cardofnt.html(approve sites)

If you want to use sans serif or monospaced foreign characters, then the installation of FreeSans and FreeMono is recommended. See https://www.gnu.org/software/freefont/

Open Document → Settings. Under the "Fonts" tab, select "Use non-TeX fonts (via XeTeX/LuaTeX)". Select Cardo as the Roman font, FreeSans for Sans Serif, and FreeMono for Typewriter.

If using biblatex, you will also need to switch from babel to polyglossia. In the LaTeX Preamble settings tab, add:

\usepackage{polyglossia}
\usepackage[style=verbose,natbib=true,citestyle=verbose,backend=biber,url=false,doi=false,isbn=false]{biblatex}
\addbibresource{some.bib}

\newfontfamily\greekfont{BABEL Unicode}

The first line ensures polyglossia is used, instead of babel. The second line uses biblatex for bibliographies, which is much more flexible than bibtex, but can be safely removed. Change the settings to suit your needs (see the excellent biblatex manual.) If not using biblatex, then remove the third line, which sets the source bib file.

The newfontfamily command is an example of how a font may be selected to typeset a particular language, overriding the main document font.

You should now be able to enter both Greek and Hebrew and set the language in LyX. The text will be properly hyphenated. The Hebrew will also be displayed and typeset properly as right-to-left text. (If you don't set the language to Hebrew, the text will not display or be typeset correctly.)

References

Categories

Linux Hebrew

Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2014-07-29 04:31 CEST