[XeTeX] mapping=tex-text and weird ligatures

Bruno Voisin bvoisin at mac.com
Fri Jun 13 11:58:38 CEST 2008


Le 13 juin 08 à 10:14, Keith J. Schultz a écrit :

> 	Just getting into xetex. The --/--- convention is handy.
> 	The TeX way would be to define say \ndash and \mdash and
> 	connect them to the proper glyphs. This could be done in xunicode,
> 	or xltctra. It is possible to put it into fontspec, but I think
> 	there it might be out of place.

There are already LaTeX commands equivalent to these ligatures. From  
p. 18 of usrguide.pdf:

ligature	character	command
---		—		\textemdash
--		–		\textendash
!`		¡		\textexclamdown
?`		¿		\textquestiondown
``		“		\textquotedblleft
''		”		\textquotedblright
`		‘		\textquoteleft
'		’		\textquoteright

I doubt, though, that anybody will want to use the commands routinely,  
unless there is a GUI providing buttons, menus or palettes for  
entering these commands. From experience, entering \guillemotleft~ and  
~\guillemotright{} for French quote marks ("guillemets") is tedious  
enough.

Regarding xunicode, it does take care of the commands (namely, mapping  
them to the appropriate Unicode code point):

\DeclareUTFcharacter[\UTFencname]{x2013}{\textendash}
\DeclareUTFcharacter[\UTFencname]{x2014}{\textemdash}
\DeclareUTFcharacter[\UTFencname]{x2018}{\textquoteleft}
\DeclareUTFcharacter[\UTFencname]{x2019}{\textquoteright}
\DeclareUTFcharacter[\UTFencname]{x201C}{\textquotedblleft}
\DeclareUTFcharacter[\UTFencname]{x201D}{\textquotedblright}
\DeclareUTFcharacter[\UTFencname]{x00A1}{\textexclamdown}
\DeclareUTFcharacter[\UTFencname]{x00BF}{\textquestiondown}

I'm wondering whether the two processes are separate or combined:  
namely, does tex-text translates -- into \textendash which is then  
translated by xunicode into code point 2013, or is tex-text  
translating -- into code point 2013 directly?

Bruno Voisin


More information about the XeTeX mailing list