0

When I compile my Hebrew document with XeTeX, the resulting PDF displays correctly with the right directionality. However, when I try to search, I have to search the term backwards in order for it to find. For example, if I have אבגד (abcd) I won't find it as is, but I will find it if I search for דגבא (dcba).

Is there any way to make the direction of the PDF search correspond to the text direction?

2
  • 2
    With the software you're using to view the PDF, are you able to search other Hebrew PDFs successfully? Or, is this the only document which causes you problems?
    – Aces
    Oct 2, 2016 at 12:56
  • Hi Guy, I think this issue is related to your pdf viewer. when i compile and use sumatra PDF as my viewer i get the same problem, but with acrobat reader, it is seems to be fine
    – Udi Fogiel
    Sep 15, 2022 at 1:25

1 Answer 1

1

I hesitate to post an "It's-working-for-me" reply as an "answer", but it might provoke a refinement of OP's issue, if nothing else.

Here is something like a "MWE", using TeXstudio 2.10.8 on a Mac (early 2015) with TL 2015 installed:

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt]{article}

\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{TeX Gyre Pagella}

\newfontfamily{\Hb}{SBL Hebrew}

\usepackage{bidi}

\title{Very Trying}
\author{David}
%\date{}

\begin{document}
\maketitle

For some time now I have thought about trying to get, {\RL{\Hb מי יודע}}, RTL mixed in, for example, and distinct RTL in my LTR text:\\

\begin{RTL}
{\Hb מי כהחכם ומי יודע פשׁר דבר}\\
\end{RTL}

This is  typeset by \textsf{bidi} package, version \bidiversion, \bididate.

\end{document}

A search of the PDF (using Preview) works exactly as expected:

search

FWIW. (The Hebrew font referenced is SBL Hebrew.)

You must log in to answer this question.

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