[XeTeX] typesetting hyphen in xelatex
Herbert Schulz
herbs at wideopenwest.com
Wed Dec 19 22:40:34 CET 2012
On Dec 19, 2012, at 9:24 AM, Pander <pander at users.sourceforge.net> wrote:
> On 2012-12-19 16:15, Sasi Kumar wrote:
>> Dear friends,
>>
>> When I enter two consecutive "minus" signs, it does not typeset in the
>> form of a long dash as in latex. Instead, it appears as two small dashes
>> together. So, what should I enter to obtain a long dash? Perhaps, the
>> same difference exists in the way three dashes are also typeset in
>> xelatex. If it does, could someone please guide me on how to get the
>> corresponding dashes in xelatex that one gets in plain latex? I have
>> another doubt too. This is regarding what is usually called "smart
>> quotes". You know those cute-looking quotes with a bulb at the bottom
>> instead of the straight dashes. I am not able to get them in xelatex,
>> whereas they used to appear by default in latex when the appropriate
>> quote symbols are used.
>>
>> Thanks in advance for any help.
>
> I think it involves this option:
> \setmainfont[Mapping=tex-text]{...}
>
Howdy,
The more ``modern' way of doing this is to use the option Ligatures=TeX, e.g.,
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
to enable that feature in all defined fonts. I tend to NOT want that available in a monospace (typewriter) font so I usually use something like
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{My Roman Font}
\setsansfont[Ligatures=TeX]{My Sans Serif Font}
\setmonofont{My Monospace Font}
so the option isn't set for the monospace font.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the XeTeX
mailing list