[XeTeX] Newbie question re XeTeX and BibTeX

Jonathan Kew jonathan_kew at sil.org
Wed May 24 18:50:44 CEST 2006


On 24 May 2006, at 5:27 pm, Steven Shaviro wrote:

>> To emulate Computer Modern's ligatures such as `` for “ and --- for
>> —, you need to load your fonts with the "tex-text" font mapping. This
>> can be done in fontspec with
>>    \setromanfont[Mapping=tex-text]{...}
>
> I did this, and the bibliography is indeed now set correctly in terms
> of curly quotes; but in the main body of the document, " in the
> source file is now translated into curly close quotes, regardless of
> whether it is at the start or the end of a quotation. So I have
> gained proper formatting in the bibliography, but lost smart-quotes
> behavior in the body of the text. What am I still doing wrong?

In the text, you should either continue to use ``old-style'' TeX  
quotes, along with the tex-text font mapping to convert them to the  
correct Unicode quote marks in the font; or use “curly” Unicode quote  
marks directly in your text.

If you use the "straight" quote mark, you're likely to get curly  
close quotes (because that's what the tex-text mapping does with it),  
just as you do if you type this in standard TeX.

The only time you'd get correct “opening and closing” curly quotes,  
having typed "straight" ones in the source, would be if the font  
you're using supports a Smart Quotes feature that does the  
replacement contextually. But this is (a) not common (I think Hoefler  
Text has this feature, but few others), and (b) unreliable because  
some contexts will confuse the feature. So I don't recommend relying  
on this. Better to explicitly type the marks you want (either in  
Unicode or in LaTeX-ese).

JK



More information about the XeTeX mailing list