[texworks] Editing Hebrew with inline math or English

Philip Taylor P.Taylor at Rhul.Ac.Uk
Sun Nov 6 20:53:15 CET 2016



Mordechai Ben-Ari wrote:
> TeXworks "almost" works OK with Hebrew.  The only problem is when I try to enter inline math or English.  If I write them on separate lines, they appear OK and compile OK:
> אבג
> $x^2+1$
> דהו
>
> but if I try to type the math on the same line, it appears like this:
> x^2+1$$
> This also compiles OK but it is very difficulty to read.
I (think I) solved the problem by inserting Unicode direction-switching markers at the appropriate points :

\font \hebrewfont = "David"

\hebrewfont

אבג‎$x^2+1$‏דהו‎

\end


As these are difficult to insert by hand, I inserted them as "[" and "]" and then used regular-expression search-and-replace to perform the necessary substitutions :

\[ -> \x200E
\] -> \x200F

PhilipTaylor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20161106/cb982e10/attachment-0001.html>


More information about the texworks mailing list