[Tex/LaTex] Babel for hebrew

babelhebrew

I am not able to write in Hebrew with latex. Every time I try to compile the process ends with a question mark. The following is an example of the document I am using:

\documentclass[dvips, a4paper, hebrew,italian,10pt]{book}


\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[hebrew,italian]{babel}
\usepackage{fontenc}

\begin{document}

תשץצסןנ

\end{document}

Any help?

Best Answer

I was able to find a solution here by finferflu who used package cjhebrew.

The code is

\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}

and the output is

enter image description here

Another possibility, for a more extended use of Hebrew(as a document language for instance) is to use XeLaTeX and polyglossia package as suggested by @egreg at Help getting started with Hebrew in babel

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{hebrew}
\setmainfont{Times New Roman}
% \newfontfamily{\hebrewfont}{New Peninim MT}
\begin{document}
\title{שלום עולם}
\author{שלום עולם}
\maketitle

העיר מקודשת ליהדות, לנצרות ולאסלאם, והיוותה מרכז חיי העם היהודי בימי
קדם ומושא געגועיו בזמן שהייתו בגלות. משום מרכזיותה בעולמם של המאמינים,
הייתה העיר מוקד למלחמות וסכסוכים הנמשכים עד עצם היום הזה. מאז סוף המאה
ה-19 התפתחו סביב העיר העתיקה שכונות העיר החדשה, המהוות כיום את רובה
המוחלט של העיר. במרכזה של ירושלים השלמה עומד הר הבית, שמפריד בין מערב
ירושלים למזרח ירושלים.

בשנת 1981 הוכרזה העיר העתיקה של ירושלים כאתר מורשת עולמית על ידי ארגון
אונסק"ו של האומות המאוחדות, והיא נמצאת ברשימת האתרים בסיכון.


\end{document}

enter image description here

Related Question