0

I created the following bilingual LaTeX document in English and Hebrew.

\documentclass{article}
\begin{document}

Hello

שלום

\end{document}

I exported the document to a pdf file using the key combination C-c c. The message tex-evince-sync-view appeared in the echo line as the export was in progress. When the file opened in Document Viewer, only the English word was visible.

I created the same document using LibreOffice Writer, exported it to pdf and double-clicked the resulting pdf file. The file opened in Document Viewer as before, but now both the English and the Hebrew words were visible.

I conclude that the problem lies in emacs/AucTex's pdf exporting mechanism, and that the problem is not due to the pdf viewer nor to the lack of suitable fonts on my system.

How can I fix emacs/AucTex to handle Hebrew correctly?

I use

  • Ubuntu 14.04 LTS

  • Emacs 24.3.1

  • AucTex 11.87.2012-12-04

  • DocumentViewer 3.10.3

  • LibreOffice Writer 4.2.7.2

Evan Aad
  • 11,066
  • 1
    To typeset Hebrew from unicode input, the easiest way is to select a font with Hebrew unicode characters and compile with LuaLaTeX or XeLaTeX: \documentclass{article}\usepackage{libertine}\begin{document} [Hebrew] \end{document}; compile lualatex file. Don't know about the AucTeX part. – musarithmia Jan 06 '15 at 16:31
  • @AndrewCashner: Thanks, Andrew. How can I test whether I have LuaLaTeX or XeLaTex installed on my system? – Evan Aad Jan 07 '15 at 11:29
  • 1
    Open a terminal and type lualatex --version. – musarithmia Jan 07 '15 at 12:18
  • @AndrewCashner: Thanks. I've compiled the document with the xetex engine and now the Hebrew letters show. However, the Hebrew words are written from left to right. Each word in itself looks correct, but the order of the words is wrong. Additionally, the Hebrew sentence is left justified whereas it should be right justified. – Evan Aad Jan 07 '15 at 13:02
  • @AndrewCashner: Thanks, Andrew, but this article involves a spattering of Hebrew embedded in a predominantly English text. What if the entire document is in Hebrew? – Evan Aad Jan 07 '15 at 15:59
  • 1
    XeLaTeX: \documentclass{article}\usepackage{libertine}\usepackage{fontspec}\usepackage{polyglossia}\setdefaultlanguage{hebrew} || LuaLaTeX: \documentclass{article}\usepackage{libertine}\usepackage{fontspec}\luatextextdir TRT – musarithmia Jan 07 '15 at 16:20

0 Answers0