[XeTeX] mapping=tex-text and weird ligatures

Peter Dyballa Peter_Dyballa at Web.DE
Fri Jun 13 12:49:03 CEST 2008


Am 13.06.2008 um 11:58 schrieb Bruno Voisin:

> 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.
>

¡It's much easier to insert „ or »!

>
>
> 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?

If you look into /usr/local/texlive/2007/texmf-dist/fonts/misc/xetex/ 
fontmapping/tex-text.map you'll see (almost):

	; ligatures from Knuth's original CMR fonts
	U+002D U+002D           <>      U+2013  ; -- -> en dash
	U+002D U+002D U+002D    <>      U+2014  ; --- -> em dash
	
	U+0027                  <>      U+2019  ; ' -> right single quote
	U+0027 U+0027           <>      U+201D  ; '' -> right double quote
	U+0022                   >      U+201D  ; " -> right double quote
	
	U+0060                  <>      U+2018  ; ` -> left single quote
	U+0060 U+0060           <>      U+201C  ; `` -> left double quote
	
	U+0021 U+0060           <>      U+00A1  ; !` -> inverted exclam
	U+003F U+0060           <>      U+00BF  ; ?` -> inverted question
	
	; additions supported in T1 encoding
	U+002C U+002C           <>      U+201E  ; ,, -> DOUBLE LOW-9  
QUOTATION MARK
	U+003C U+003C           <>      U+00AB  ; << -> LEFT POINTING GUILLEMET
	U+003E U+003E           <>      U+00BB  ; >> -> RIGHT POINTING  
GUILLEMET

So it's tex-text that directly translates the dumb "di- and  
trigraphs" into the right characters. Xunicode.sty offers:

	\DeclareUTFcharacter[\UTFencname]{x00A1}{\textexclamdown}
	\DeclareUTFcharacter[\UTFencname]{x00AB}{\guillemotleft}
	\DeclareUTFcharacter[\UTFencname]{x00BB}{\guillemotright}
	\DeclareUTFcharacter[\UTFencname]{x00BF}{\textquestiondown}
	\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]{x201E}{\quotedblbase}

So it translates your "~\guillemotright{}" into something more sane.

--
Greetings

   Pete

America believes in education: the average professor earns more money  
in a year than a professional athlete earns in a whole week.
				– Evan Esar






More information about the XeTeX mailing list