[OS X TeX] xetex, bibdesk and bibtex?

Bruno Voisin bvoisin at mac.com
Sat May 14 06:54:20 EDT 2005


Le 14 mai 05 à 10:10, Jonas Wellendorf a écrit :

> På 14. mai. 2005 kl. 07.43 skrev Bruno Voisin:
>
>> Le 12 mai 05 à 11:22, Jonas Wellendorf a écrit :
>>
>>> I use bibdesk and texshop (newest versions for OS X 10.3). I have  
>>> no problems with the combination latex+bibtex but when I use the  
>>> combination xelatex+bibtex the characters “ and  
>>> ” [quotationmarks] and – [m-dash] in my bibliography appear as  
>>> ``, '' and -- in the typeset pdf-file.
>>> On my (Norwegian) keyboard I enter these characters as [alt+n],  
>>> [alt+m] and [alt+-].
>>>
>>> How should I enter these characters to get the expected output? I  
>>> would like to use the same bibtex database for botht ypes of  
>>> documents.
>>>
>>> I use the UFT-8 encoding in bibdesk.
>>
>> I am not sure regarding BibTeX (I don't use it), but regarding  
>> XeTeX you should make sure the fonts are called with the option  
>> ":mapping=tex-text", as in:
>>
>> [...]
>
> Thank you for your suggestion. Unfortunately it did not solve my  
> problem.
>
> I do use the fontspec package. According to the manual the  
> mappint=tex-text option will make -- appear as –. My problem is  
> that the opposite happens: – in my bibtex file appears as -- in my  
> finished document.

Again this may or may not be related with your problem, but searching  
my XeTeX list mailbox I found the following message, from almost a  
year ago. That was before the "mapping=tex-text" mechanism was  
introduced; hence, to be handled with care.

That said, the problem may as well be caused by the way BibDesk  
saves .bib files. I tried opening with BibDesk a .bib file from the  
doc of a package I use, editing one of the references by changing  
"--" to an UTF-8 en-dash "–" (Shift-Alt-- on my French keyboard),  
saving the result in UTF-8 encoding and opening this saved .bib file  
in a text editor: in the file, the "--" that I had changed to "–"  
still appears as "--". I'm not experienced with BibDesk at all, thus  
I may not have been doing what I think I did, but it seems BibDesk  
converts "–" to "--" upon saving, and similarly “ to `` and ” to ''.  
This ensures maximum compatibility with traditional TeX engines, but  
imposes the use of "mapping=tex-text" or [Mapping=tex-text] with XeTeX.

You may also try the XeTeX mailing list, where you're more likely to  
find people knowledgeable in these matters.

Bruno Voisin


> De : Atip Asvanund
> Date : 14 juillet 2004 21:15:10 HAEC
> À : Unicode-based TeX for Mac OS X
> Objet : Rép : [XeTeX] Replacing `` and '' with the unicode  
> equivalences in BibTeX?
>
> Dear Steffen,
>
> For reasons beyond my understand, your macro did work beautifully  
> for me.
> I am hoping that it won't break for anything else I will do in the  
> future.
>
> I have an off-topic question for you. Why do you choose Hoefler  
> Text for
> your paper writing font?
>
> Thank you,
>
> Atip
>
> On Wed, 14 Jul 2004, Steffen Prohaska wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi,
>>
>> On Jul 14, 2004, at 7:09 PM, Atip Asvanund wrote:
>>
>>>> I try to use XeLaTeX with BibTeX. In certain BibTeX styles (e.g.,
>>>> Harvard
>>>> Style) bibliography is printed out with quotaions around document
>>>> titles.
>>>>
>>>> However, with XeLaTeX they are printed out as `` and '', rather  
>>>> than
>>>> the
>>>> unicode equivalences. Is there a way I can redefine the global
>>>> property so
>>>> that the unicode equivalences will show up properly?
>>>
>>> I posted a weird macro which would do the job, recently, see
>>> http://tug.org/pipermail/xetex/2004-July/000564.html
>>>
>>> But as I didn't achieve to get such a macro working for '--' I  
>>> was kind
>>> of stuck. I'm now trying to completely avoid the TeX specific  
>>> encodings
>>> and replace them by macros. The macros can then be either defined to
>>> expand to old-TeX style or to utf-8, e.g:
>>>
>>> old TeX:
>>> \newcommand{\Quote}[1]{``#1''}
>>> \def\Dash/{--}
>>>
>>> utf-8:
>>> \newcommand{\Quote}[1]{“#1”}
>>> \def\Dash/{–}
>>>
>>> Together with the macros I posted some minutes ago (to another  
>>> thread
>>> to keep things sorted), I'm near to ``works for me'' :) Here they  
>>> are
>>> again:
>>>
>>> utf-8:
>>> \renewcommand{\"}[1]{\if#1a{ä}\else\if#1A{Ä}\else\if#1u{ü}\else 
>>> \if#1U{Ü}
>>> \else\if#1o{ö}\else\if#1O{Ö}\else ERROR: unexpected character
>>>
>>>> #1<\fi\fi\fi\fi\fi\fi}
>>>>
>>> \renewcommand{\c}[1]{\if#1c{ç}\else\if#1C{Ç}\else ERROR: unexpected
>>> character >#1<\fi\fi}
>>>
>>>     Steffen
>>>
>>> - --
>>> PGP Public Key: http://www.zib.de/prohaska/prohaska.pgp
>>> Key id: 0xDA749299
>>> Key fingerprint: 8B59 83A8 A43D E0E2 DEDB  D479 3157 2FEA DA74 9299
>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.2.2 (Darwin)
>>>
>>> iD8DBQFA9X5HMVcv6tp0kpkRArxyAJ0b294NaKa7CBlZdo5s7c2XyXuhLQCeI077
>>> AGigsqx08BInV7uvyK6XTeQ=
>>> =ZHhZ
>>> -----END PGP SIGNATURE-----
>>>
>>> _______________________________________________
>>> XeTeX mailing list
>>> postmaster at tug.org
>>> http://tug.org/mailman/listinfo/xetex
>>
>> _______________________________________________
>> XeTeX mailing list
>> postmaster at tug.org
>> http://tug.org/mailman/listinfo/xetex
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list