<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">Mordechai Ben-Ari wrote:<br>
</div>
<blockquote type="cite"
cite="mid:B006D054A108EE46A48EE1C726F39326874154CB@IBWMBX01">
<pre wrap="">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.</pre>
</blockquote>
I (think I) solved the problem by inserting Unicode
direction-switching markers at the appropriate points :<br>
<br>
<tt>\font \hebrewfont = "David"</tt><tt>
</tt>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><tt>\hebrewfont</tt></p>
<tt>
</tt>
<p dir="rtl" style=" margin-top:0px; margin-bottom:0px;
margin-left:0px; margin-right:0px; -qt-block-indent:0;
text-indent:0px;"><tt>אבג$x^2+1$דהו</tt></p>
<tt>
</tt>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><tt>\end</tt><br>
</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
</p>
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 :<br>
<br>
\[ -> \x200E<br>
\] -> \x200F<br>
<br>
PhilipTaylor<br>
</body>
</html>