Thanks to all for the detailed replies! (And to Will for the welcome comments.)<br><br>Will's solution,<br><br>\newcommand\MyFontShape[6]{\DeclareFontShape{#1}{#2}{#3}{#4}{#5}{#6}}<br><div style="direction: ltr;">\MyFontShape{U}{test}{m}{n}{<->"Times New Roman"}{}
</div><br>is certainly good enough for me.<br><br>As to Jonathan's question:<br><br>Yes, there is markup to mark the Latin words, paragraphs, etc. I use LyX, which works very well in these mixed-direction documents, and it wraps English text within the Hebrew flow with \L, as in \L{Matlab}. This is processed by babel to switch both direction and language. The problem is that babel will switch a font encoding when it switches language, but I don't think that there is a way to tell it to switch font family. I prefer to hack babel as little as possible, because major hacks tend to be difficult to distribute to other Hebrew users and to maintain.
<br><br>So in summary, I am looking for a small hack, even if it is ugly, in order to use LyX and babel "out-of-the-box" as much as possible.<br><br>I think that I still need to resolve other problems, like mirroring of parenthesis and some spacing problems in enumerate environments.
<br><br>But the ability to use installed OpenType is a joy!<br><br>Regards, Sivan<br><br><br><div><span class="gmail_quote">On 6/24/07, <b class="gmail_sendername">Jonathan Kew</b> <<a href="mailto:jonathan_kew@sil.org">
jonathan_kew@sil.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 24 Jun 2007, at 11:56 am, Sivan Toledo wrote:<br>
<br>> Hi, I use a declaration like<br>><br>> \DeclareFontShape{EU2}{arial}{m}{n}{<-> "Times New Roman" }{}<br>><br>> but I am getting an error message:<br>><br>> ! Font EU2/arial/m/n/10=TimesNewRoman at
10.0pt not loadable:<br>> Metric (TFM) file or installed font not found.<br>><br>> I am running under windows, with<br>><br>> \XeTeXinputencoding "iso8859-8"<br>><br>> It seems that spaces are truncated in font names. I don't have a
<br>> problem with things like "Arial".<br>><br>> Any help will be appreciated.<br><br>This is because the LaTeX NFSS macros deliberately ignore spaces<br>within the scope of \DeclareFontShape. To work around this, you can
<br>use the \space macro to include them, I believe:<br><br> \DeclareFontShape{EU2}{arial}{m}{n}{<-> "Times\space New\space<br>Roman" }{}<br><br>> (why I am trying to use \DeclareFontShape with a weird encoding
<br>> rather rely on fontspec:<br>> because I am trying to get XeLaTeX to work with Hebrew documents,<br>> which often contain latin words/phrases. Good Hebrew fonts often<br>> don't have good Latin glyphs, so the usual solution, which works
<br>> well under babel, is to switch fonts when you switch language.<br>> There isn't a built in mechanism for this under babel, as far as I<br>> know, so I cheat and tell babel to switch encoding, just to force
<br>> it to switch the physical font when switching language; I am trying<br>> to get this to work with XeTeX now and I have the above problem<br>> with spaces).<br><br>If I'm understanding your description correctly, there must be markup
<br>in your source document to distinguish the Latin-script fragments,<br>right? In that case, would it be simpler to explicitly switch fonts<br>at the same time as switching language, by creating a command that<br>incorporates both the Babel language-switch and a fontspec font-
<br>switch? I don't really know about using Hebrew and Babel, but I'd<br>guess that something along the lines of:<br><br> \usepackage[english,hebrew]{babel}<br> \usepackage{fontspec}<br> \setmainfont[Script=Hebrew]{Arial}
<br> \newfontfamily{\tnr}{Times New Roman}<br><br> \newcommand{\eng}[1]{{\beginL\selectlanguage{english}\tnr #1\endL}}<br><br>would allow you to mark English words with \eng{word} in the<br>document, and have the Babel language and the font switch as needed.
<br>(Adjust commands, languages, fonts, etc as needed for your situation,<br>of course.)<br><br>JK<br><br>_______________________________________________<br>XeTeX mailing list<br><a href="mailto:postmaster@tug.org">postmaster@tug.org
</a><br><a href="http://tug.org/mailman/listinfo/xetex">http://tug.org/mailman/listinfo/xetex</a><br></blockquote></div><br>