I went through multiple guides and explanations until I finally managed to compile documents with mixed English and Hebrew. However, because of the multitude of methods I saw, I am now unsure whether what I did is the best way to go about it, and would like to know of any potential pitfalls I may encounter in the future because of this.
What I had: Ubuntu 14.04 LTS with some installation of TexLive (I'm not sure exactly what it included).
What I did: Installed the Culmus package. Installed install-tl-ubuntu and ran sudo ./install-tl-ubuntu --hebrew (thanks Scott!).
After this I am able to compile documents like this, for example:
\documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[english,hebrew]{babel}
\begin{document}
\selectlanguage{english}
Hello World
\selectlanguage{hebrew}
שלום עולם
\selectlanguage{english}
Usually I write in English.
\begin{otherlanguage}{hebrew}
אבל לפעמים אני חייב לכתוב בעברית.
\end{otherlanguage}
But I'm not sure how.
\end{document}
This doesn't work with utf8 instead of utf8x.
Is this a proper way to write mixed-language documents? Is it dated? What problems or limitations might I face if I keep working like this, and how could I avoid them?
babelis clearest to writemain=english. – Andrew Swann May 07 '15 at 11:22[utf8]instead of[utf8x]someone would have to write an h8enc.dfu -- not really difficult but time consuming as one would have to check the encoding and the definitions. – Ulrike Fischer May 07 '15 at 12:30