0

I need to write thesis abstract in Hebrew, but I get compilation errors of the kind:

Font LHE/cmr/m/n12=jerus10 at 12.0pt not loadable: Metric (TFM) file not found 

I use MikTeX2.9 and TeXnicCenter.

Here is a MWE:

\documentclass[12pt]{article}
\usepackage[english,hebrew]{babel}
\usepackage{culmus}
\usepackage{setspace}
\setlength\headheight{15pt}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\pagenumbering{gobble}

\begin{document}
\doublespacing

\begin{center}
\Huge
\textbf{תקציר}
\end{center}

ניסוי ותהייה, או ניסוי וטעיה?

\end{document}

I have seen other posts of people which encountered the same problem, but haven't found a solution to the problem.

I have downloaded and installed Hebrew Culmus fonts for MikTeX from this site: http://www.ma.huji.ac.il/~sameti/tex/culmusmiktex.html

But I still get the same errors.

What can be done ??

user4861528
  • 289
  • 1
  • 8

1 Answers1

1

I advise you not to use pdflatex and culmus. It has many problems and there is no one with the knowledge, the will and the time to sort them out. Better switch to lualatex or xelatex. E.g. this here then works fine:

\documentclass[12pt]{article}
\usepackage[english,bidi=basic]{babel} %bidi=default with xelatex
\babelprovide[import,main]{hebrew}

\babelfont{rm}[Language=Default]{Latin Modern Roman}
\babelfont[hebrew]{rm}{DejaVu Sans}

\begin{document}

\begin{center}
\Huge
\textbf{תקציר}
\end{center}

ניסוי ותהייה, או ניסוי וטעיה?

\selectlanguage{english} some text 

\end{document}

enter image description here

Ulrike Fischer
  • 327,261
  • I copied your example. When I tried to compile it with XeLateX I got 1 error: 'The bidi method 'basic' is available only in luatex'. And when I used LuaTeX I got 14 errors mainly of the type: 'String contains an invalid utf-8 sequence'. What can cause that ?? – user4861528 Jan 30 '19 at 19:14
  • Well the comment behind the babel says that xelatex needs a different option. And regarding the encoding: ensure that your file is utf8 encoded. – Ulrike Fischer Jan 30 '19 at 19:15
  • But how can I fix the xelatex problem- What does it mean that xelatex needs a different option, and how can I make this different option step by step ? And regarding the luatex: How can I ensure a utf8 encoding? – user4861528 Jan 30 '19 at 19:51
  • Replace bidi=basic by bidi=default when using xelatex. I can't tell you how to store in utf8 as it depends on the editor (you will need utf8 in any case, with culmus, with xelatex and lualatex, so better find out how to do it). – Ulrike Fischer Jan 30 '19 at 20:11
  • I replaced bidi=default instead of bidi=basic, and indeed I didn't get any error, but in the pdf generated I got question marks instead of the Hebrew letters. Maybe the 1 warning that I got explains the reason for that: 'Package fontspec Warning: Language 'Hebrew' not available for font 'DejaVu Sans' with script 'Hebrew'. 'Default' language used instead.'. Now, how can I fix that ?? – user4861528 Jan 30 '19 at 20:21
  • No, one don't get question marks because of this warnings. Are you sure that your file is now utf8 encoded? Does lualatex works? – Ulrike Fischer Jan 30 '19 at 21:20
  • Sorry. I thought that since XeLaTeX doesn't give me errors regarding the encoding then I don't need to change the encoding when I use xelatex. I'm working with TeXnicCenter editor. Can you please tell me how to change the encoding to utf8 with this editor? – user4861528 Jan 30 '19 at 21:28
  • I already told you that utf8 is mandatory. See https://tex.stackexchange.com/questions/146505/how-to-change-encoding-in-texniccenter-2-0. – Ulrike Fischer Jan 30 '19 at 21:31
  • Thank you. After changing the encoding your example worked. I still have a request: The current font resembles the 'Arial' font and I want the hebrew font to resemble the 'David' font- How can I do that? – user4861528 Jan 30 '19 at 21:56
  • Find a suitable font and then use it. I only took dejavu as example it is in texlive. – Ulrike Fischer Jan 30 '19 at 22:01