2

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?

3

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

  • I already knew the "cjhebrew" package and that is good if you have to write short sentences, but since in that way it takes to long to write entire chapters, I was looking for a way to write hebrew in a non "coded way" and be able to paste hebrew writings directly in latex. – Billy Sep 20 '14 at 10:42
  • I just copied and pasted the code you wrote with the polyglossia package but the result is the same, the compiler ends the process with a useless question mark, no explanation given. – Billy Sep 20 '14 at 11:09
  • @Billy:First of all, you have to set your editor's encoding to utf8. Secondly did you run it using XeLaTeX? – Thanos Sep 20 '14 at 11:18
  • I did that, and tried that too. – Billy Sep 20 '14 at 12:53
  • And yet it's not working? Can you upload in your question the .log file? – Thanos Sep 20 '14 at 15:46
3

You will need to install culmus-latex in order to Hebrew font support. Afterwards, the following example should compile find and display Hebrew correctly:

\documentclass{article}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[english,hebrew]{babel}
\begin{document} 
שלום \L{World}!
\end{document}
  • 1
    Thanks, but I use windows and apparently I can't install culmus. Any other suggestion? I am quite desperate. – Billy Sep 20 '14 at 16:29
  • I found an .exe of culmus for windows and installed it. Now the compiler says that "jeru10" is missing, and I am not able to find this font anywhere. – Billy Sep 20 '14 at 17:35
  • You should add \usepackage{culmus}. It will force LaTeX to use the Culmus fonts instead of the old one (jeru stands for the old Jerusalem font from Ivritex). – Guy Sep 30 '14 at 21:31
1

Try switching between the "hebrew" and "italian" position in the class and babel commands. This is your code with the changes marked:

\documentclass[dvips, a4paper, italian, hebrew ,10pt]{book} % <- here

\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[italian, hebrew]{babel} % <- and here
\usepackage{fontenc}

\begin{document}

תשץצסןנ

\end{document}

I get the same errors as you when I copy your code to Texmaker on windows with culmus-latex installed, and everything works fine when changing places. It seems like the problem is having "hebrew" as the first language.

  • Without reply from OP we will never know if this works at all. :( – awllower Jul 19 '16 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.