0

Im trying to use culmus to write in hebrew few words as following for example:

\documentclass[a4paper, 10pt]{article}

\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{culmus}
\usepackage[english,hebrew]{babel}
\begin{document} 


\title{Machine Learning}
\maketitle
שלום

\end{document}

However, the result shows that the english letters go from right to left.

enter image description here

Is there any way to fix it?

Thank you.

4

2 Answers 2

1

There is an example in the babel doc, page 23, section 1.14 (selecting fonts)

\documentclass{article}
\usepackage[swedish,bidi=default]{babel}
\babelprovide[import=he]{hebrew}
\babelfont{rm}{FreeSerif}
\begin{document}
Svenska \foreignlanguage{hebrew}{...} svenska.
\end{document}
6
  • The main language should be last for babel so you have to change the 5th line : \usepackage[hebrew,english]{babel}
    – Thorn
    Commented Aug 10, 2018 at 19:49
  • Im getting some errors about "'bidi=default', either you have misspelled the (babel) key or there is a previous setting of 'babel'" is the error I get.
    – Ben
    Commented Aug 11, 2018 at 8:30
  • Which babel version do you have in your system ?
    – Thorn
    Commented Aug 11, 2018 at 8:44
  • from MiKTex Package Manager it says 3.9r
    – Ben
    Commented Aug 11, 2018 at 8:45
  • The last version is v3.22 (2018/06/05). Try to update your installation.
    – Thorn
    Commented Aug 11, 2018 at 8:51
0

If you are amenable to using XeLaTeX as your compiler, you might try this:

\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\setmainfont{FreeSans} % set font to something on your system that supports
% hebrew glyphs
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{hebrew}
\begin{document}
This is a test.

\texthebrew{בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת הָאָרֶץ}
\end{document}

You will need to set your font as mentioned in the comment. A very readable serif font that supports Hebrew and others is Cardo: http://scholarsfonts.net/cardofnt.html. Install as appropriate for your operating system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .