[XeTeX] mapping=tex-text and weird ligatures
Mojca Miklavec
mojca.miklavec.lists at gmail.com
Fri Jun 13 13:13:57 CEST 2008
On Fri, Jun 13, 2008 at 11:58 AM, Bruno Voisin wrote:
> 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
No, it acts on font level. If you tell XeTeX that it should map " to
some double quotation mark then there's no way to get the literal
quotation mark in your document any more (unless you use another
font).
> which is then
> translated by xunicode into code point 2013, or is tex-text
> translating -- into code point 2013 directly?
On Fri, Jun 13, 2008 at 9:42 AM, Will Robertson wrote:
> On 13/06/2008, at 4:58 PM, Joseph Wright wrote:
>
> The tex-text mapping is designed more as a "backwards compatibility" measure
> for old documents. I don't really see the advantage of writing a new mapping
> for new documents only, especially given that some people don't need ``/'',
> some people don't need --/---, and so on. I'd say there are vanishingly few
> cases where people find the few mappings such as `? inconvenient.
Maybe not `?, but as a concrete example - I had a problem when I
wanted to use "schwa (read as: some/any weird character) with grave
accent" (in Latin Modern, but could be any other font).
tex-text maps backtick ` to single quotation mark, but the same
character is being used for "grave accent". And if tex-text remaps
that character to quotation mark, then grave accent is not accessible
any more, and I was not able to combine the caracter using TeX.
OK, you will probably tell me that I should have used combining grave
at this place, but LM doesn't really support combining characters
properly (yet). So asking TeX for placing the accent was a natural
choice that didn't work with current mapping available.
But of course - there is no strong need to have another mapping, and
we (will) have it in ConTeXt anyway.
Mojca
PS: I also like simple quotation mark " to be available in font
instead of resolving to double quottion mark ...
More information about the XeTeX
mailing list